Update Tokenizer.php

`Trying to access array offset on value of type null` Exception fix in php >= 7.4
This commit is contained in:
Igor V 2020-02-04 22:25:28 +04:00 committed by GitHub
parent fc188a5822
commit 7614d7235d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -254,6 +254,9 @@ class Tokenizer
*/
public function current()
{
if (is_null($this->curr)) {
return null;
}
return $this->curr[1];
}