Closed laruence closed 8 years ago
Hi Xinchen Hui, thanks for finding the bug in phpsass on php7.
i think this is the better approach to fix the bug by emulating the old behavior:
// whilst the string is not empty, split it into it's tokens.
while ($string !== false) {
...
if ($string === '')
$string = false;
}
Thanks, this is fixed and passing in this pull request https://github.com/richthegeek/phpsass/pull/184
If you want, clone my repo https://github.com/joejoseph00/phpsass until this is merged.
Hey:
I am Xinchen Hui, PHP7 core developer, I found an infinity loop in your repo while I was looking into a bug report relates to your repo: https://bugs.php.net/bug.php?id=71179
the problem is since PHP7, substr("", 0) will return "" instead of false, which is documented in http://php.net/manual/en/function.substr.php,
so your codes will result in infinity loop as you are trying to compare the result with false.
here is a quick fix:
please have a look... thanks