mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for migration validation
This commit is contained in:
parent
ab1b614855
commit
3eee79d9b3
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user