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

View File

@ -29,6 +29,10 @@ trait CompanyGatewayFeesAndLimitsSaver
foreach ($casts as $key => $value) { 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 */ /* 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} == '') { if (! property_exists($fee_and_limit, $key) || is_null($fee_and_limit->{$key}) || ! isset($fee_and_limit->{$key}) || $fee_and_limit->{$key} == '') {
continue; continue;

View File

@ -35,6 +35,12 @@ trait SettingsSaver
ksort($casts); ksort($casts);
foreach ($casts as $key => $value) { 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)) { if (in_array($key, CompanySettings::$string_casts)) {
$value = 'string'; $value = 'string';
if (! property_exists($settings, $key)) { if (! property_exists($settings, $key)) {