From: Tim Starling Date: Wed, 4 Oct 2006 08:43:09 +0000 (+0000) Subject: strcspn bug: http://bugs.php.net/bug.php?id=39032 X-Git-Tag: 1.31.0-rc.0~55629 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=ea4e4b0ed1b7d028af1d0d9c7346fb7851a1ef92;p=lhc%2Fweb%2Fwiklou.git strcspn bug: http://bugs.php.net/bug.php?id=39032 --- diff --git a/includes/Parser.php b/includes/Parser.php index 31ec709931..2502136030 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2561,9 +2561,14 @@ class Parser $found = 'pipe'; } elseif ( $text[$i] == $currentClosing ) { $found = 'close'; - } else { + } elseif ( isset( $callbacks[$text[$i]] ) ) { $found = 'open'; $rule = $callbacks[$text[$i]]; + } else { + # Some versions of PHP have a strcspn which stops on null characters + # Ignore and continue + ++$i; + continue; } } else { # All done