fixes for casts (#3382)

This commit is contained in:
David Bomba 2020-02-26 19:04:20 +11:00 committed by GitHub
parent a74b644f6a
commit 628b77e369
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@
namespace App\Utils\Traits;
use App\DataMapper\BaseSettings;
use App\DataMapper\CompanySettings;
use App\DataMapper\FeesAndLimits;
@ -83,11 +84,13 @@ trait CompanyGatewayFeesAndLimitsSaver
{
$new_arr = [];
foreach ($fees_and_limits as $key => $value) {
$fal = new FeesAndLimits;
foreach ($value as $k => $v) {
$fal->{$k} = $v;
$fal->{$k} = BaseSettings::castAttribute(FeesAndLimits::$casts[$k], $v);
}
$new_arr[$key] = (array)$fal;