From ea4e4b0ed1b7d028af1d0d9c7346fb7851a1ef92 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 4 Oct 2006 08:43:09 +0000 Subject: [PATCH] strcspn bug: http://bugs.php.net/bug.php?id=39032 --- includes/Parser.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.20.1