Skip to content

Commit

Permalink
Fix notice when checking for anonymous classes in autoload generator (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric authored and andrerom committed Dec 18, 2019
1 parent 56e779d commit b3a8326
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/private/classes/ezautoloadgenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b3a8326

Please sign in to comment.