Skip to content

Conversation

@dfletcher
Copy link

This file contains a loop checking if $string !== false. Because of this subtle change in PHP 7, the loop while statement evaluates as "" !== false which always returns true. The loop continues forever until PHP runs out of memory.

The simple fix is to replace the exact type check of !== with simply !=. Then when substr() returns an empty string, the comparison returns false and the loop breaks at the proper time.

…remove the type strict check. Without this the loop never ends and the script runs out of memory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant