Fixes for migration validation

This commit is contained in:
David Bomba 2022-03-28 12:46:38 +11:00
parent ab1b614855
commit 3eee79d9b3
3 changed files with 12 additions and 2 deletions

View File

@ -42,6 +42,7 @@ class QueryLogging
$timeStart = microtime(true);
DB::enableQueryLog();
$response = $next($request);
// hide requests made by debugbar
if (strstr($request->url(), '_debugbar') === false) {
@ -71,7 +72,6 @@ class QueryLogging
->queue();
}
return $next($request);
return $response;
}
}

View File

@ -29,6 +29,10 @@ trait CompanyGatewayFeesAndLimitsSaver
foreach ($casts as $key => $value) {
if($value == 'float' && property_exists($fee_and_limit, $key)){
$fee_and_limit->{$key} = floatval($fee_and_limit->{$key});
}
/* Handles unset settings or blank strings */
if (! property_exists($fee_and_limit, $key) || is_null($fee_and_limit->{$key}) || ! isset($fee_and_limit->{$key}) || $fee_and_limit->{$key} == '') {
continue;

View File

@ -35,6 +35,12 @@ trait SettingsSaver
ksort($casts);
foreach ($casts as $key => $value) {
//try casting floats here
if($value == 'float' && property_exists($settings, $key)){
$settings->{$key} = floatval($settings->{$key});
}
if (in_array($key, CompanySettings::$string_casts)) {
$value = 'string';
if (! property_exists($settings, $key)) {