mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-24 18:16:28 +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 = [];
|
||||
|
||||
if ($object instanceof \Closure && '__invoke' === $item) {
|
||||
return $isDefinedTest ? true : $object();
|
||||
}
|
||||
|
||||
if (isset($object->$item)
|
||||
|| ($propertyCheckers[$object::class][$item] ??= self::getPropertyChecker($object::class, $item))($object, $item)
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user