Fixes for casts

This commit is contained in:
David Bomba 2021-02-22 21:35:00 +11:00
parent 84d3ca8738
commit c0d49fff40
2 changed files with 7 additions and 0 deletions

View File

@ -169,6 +169,9 @@ trait CompanySettingsSaver
if (substr($key, -3) == '_id' || substr($key, -14) == 'number_counter') {
$value = 'integer';
if($key == 'gmail_sending_user_id')
$value = 'string';
if (! property_exists($settings, $key)) {
continue;
} elseif ($this->checkAttribute($value, $settings->{$key})) {

View File

@ -48,6 +48,10 @@ trait SettingsSaver
/*Separate loop if it is a _id field which is an integer cast as a string*/
elseif (substr($key, -3) == '_id' || substr($key, -14) == 'number_counter') {
$value = 'integer';
if($key == 'gmail_sending_user_id')
$value = 'string';
if (! property_exists($settings, $key)) {
continue;
} elseif (! $this->checkAttribute($value, $settings->{$key})) {