Attempt to cast floats immediately in settings saver
This commit is contained in:
parent
49733b155c
commit
130803efd6
1 changed files with 5 additions and 0 deletions
|
|
@ -193,6 +193,11 @@ trait CompanySettingsSaver
|
|||
settype($settings->{$key}, 'object');
|
||||
}
|
||||
|
||||
//try casting floats here
|
||||
if($value == 'float'){
|
||||
$settings->{$key} = floatval($settings->{$key});
|
||||
}
|
||||
|
||||
/* Handles unset settings or blank strings */
|
||||
if (! property_exists($settings, $key) || is_null($settings->{$key}) || ! isset($settings->{$key}) || $settings->{$key} == '') {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue