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