Fixed serialization issue

Change-Id: Iba3c984ef21d9ca407c201513fc99fa08b473384
Signed-off-by: smarcet <smarcet@gmail.com>
This commit is contained in:
smarcet 2020-09-23 09:58:01 -03:00
parent 2bbd5365a6
commit 1c1c05b8ed

View File

@ -183,13 +183,20 @@ abstract class AbstractSerializer implements IModelSerializer
}
catch (\Exception $ex){
Log::warning($ex);
$value = null;
}
}
}
if(!$method_found){
//try dynamic one
$value = call_user_func([$this->object, 'get'.$attribute ]);
try {
//try dynamic one
$value = call_user_func([$this->object, 'get'.$attribute ]);
}
catch (\Exception $ex){
Log::warning($ex);
$value = null;
}
}
if(count($mapping) > 1)