diff --git a/src/Common/Object.php b/src/Common/Object.php index d39188a..81c57d6 100644 --- a/src/Common/Object.php +++ b/src/Common/Object.php @@ -29,7 +29,7 @@ public function __construct(array $state = []) //$camelcased_property = lcfirst($studly_property_name); $setter_method = 'set' . ucfirst($studly_property_name); - if (is_callable([$this, $setter_method])) { + if (method_exists($this, $setter_method)) { $this->$setter_method($property_value); } elseif (property_exists($this, $property_name)) { $this->$property_name = $property_value;