Skip to content

Commit b3a8326

Browse files
emodricandrerom
authored andcommitted
Fix notice when checking for anonymous classes in autoload generator (#1450)
1 parent 56e779d commit b3a8326

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/private/classes/ezautoloadgenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ protected function getClassFileList( $fileList, $mode )
643643
* @see https://www.php.net/manual/en/language.oop5.anonymous.php
644644
* NEW_TOKEN - WHITESPACE_TOKEN - CLASS_TOKEN
645645
*/
646-
if($tokens[$key-2][0] === T_NEW) {
646+
if(isset($tokens[$key-2][0]) && $tokens[$key-2][0] === T_NEW) {
647647
break;
648648
}
649649

0 commit comments

Comments
 (0)