diff --git a/src/PersistentData/Model/Model.php b/src/PersistentData/Model/Model.php index 23b2840..c5f566c 100644 --- a/src/PersistentData/Model/Model.php +++ b/src/PersistentData/Model/Model.php @@ -41,7 +41,7 @@ abstract class Model { $array = []; - foreach (self::getFields() as $key) { + foreach (static::getFields() as $key) { $method = 'get' . str_replace('_', '', ucwords($key, '_')); if (method_exists($this, $method)) {