1
0
mirror of https://github.com/danog/PHP-Parser.git synced 2025-01-22 13:51:12 +01:00

Remove PHP 5 substr() workaround

In PHP 7 it no longer returns false instead of '' in this case.
This commit is contained in:
Nikita Popov 2017-09-29 17:51:44 +02:00
parent 403a7c5315
commit a02990a39a

View File

@ -326,7 +326,7 @@ class Lexer
$this->pos = count($this->tokens); $this->pos = count($this->tokens);
// return with (); removed // return with (); removed
return (string) substr($textAfter, strlen($matches[0])); // (string) converts false to '' return substr($textAfter, strlen($matches[0]));
} }
/** /**