mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-20 14:36:57 +00:00
Remove obsolete PHP 8.0 workaround for Closure::__invoke attribute access
This commit is contained in:
@@ -1795,10 +1795,6 @@ final class CoreExtension extends AbstractExtension
|
|||||||
|
|
||||||
static $propertyCheckers = [];
|
static $propertyCheckers = [];
|
||||||
|
|
||||||
if ($object instanceof \Closure && '__invoke' === $item) {
|
|
||||||
return $isDefinedTest ? true : $object();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($object->$item)
|
if (isset($object->$item)
|
||||||
|| ($propertyCheckers[$object::class][$item] ??= self::getPropertyChecker($object::class, $item))($object, $item)
|
|| ($propertyCheckers[$object::class][$item] ??= self::getPropertyChecker($object::class, $item))($object, $item)
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user