Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,7 @@ protected function setAttributeValue(object $object, string $attribute, $value,
$key = \get_class($object).':'.$setter;

if (!isset(self::$setterAccessibleCache[$key])) {
try {
// We have to use is_callable() here since method_exists()
// does not "see" protected/private methods
self::$setterAccessibleCache[$key] = \is_callable([$object, $setter]) && !(new \ReflectionMethod($object, $setter))->isStatic();
} catch (\ReflectionException $e) {
// Method does not exist in the class, probably a magic method
self::$setterAccessibleCache[$key] = false;
}
self::$setterAccessibleCache[$key] = method_exists($object, $setter) && \is_callable([$object, $setter]) && !(new \ReflectionMethod($object, $setter))->isStatic();
}

if (self::$setterAccessibleCache[$key]) {
Expand Down