From b3a83269d974c65b79a6fe5d97ed11390957258a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Wed, 18 Dec 2019 14:51:49 +0100 Subject: [PATCH] Fix notice when checking for anonymous classes in autoload generator (#1450) --- kernel/private/classes/ezautoloadgenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/private/classes/ezautoloadgenerator.php b/kernel/private/classes/ezautoloadgenerator.php index 1b636700e7e..96f4a1b38d4 100644 --- a/kernel/private/classes/ezautoloadgenerator.php +++ b/kernel/private/classes/ezautoloadgenerator.php @@ -643,7 +643,7 @@ protected function getClassFileList( $fileList, $mode ) * @see https://www.php.net/manual/en/language.oop5.anonymous.php * NEW_TOKEN - WHITESPACE_TOKEN - CLASS_TOKEN */ - if($tokens[$key-2][0] === T_NEW) { + if(isset($tokens[$key-2][0]) && $tokens[$key-2][0] === T_NEW) { break; }