From 47413f64604422556a32b4aa6594a659101413ff Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 16 May 2009 16:04:42 +0000 Subject: - Patch #368116 by chx, c960657: fixed bug in tokenizer for registry. --- includes/registry.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'includes/registry.inc') diff --git a/includes/registry.inc b/includes/registry.inc index 569945746..cfc7ae118 100644 --- a/includes/registry.inc +++ b/includes/registry.inc @@ -262,6 +262,12 @@ function _registry_skip_body(&$tokens) { elseif ($token == '}') { --$num_braces; } + // Consume strings manually as workaround for a bug in PHP < 5.2.3 (see + // http://drupal.org/node/368116). + elseif ($token == '"' || $token == '`' || (is_array($token) && $token[0] == T_START_HEREDOC)) { + $stop = is_array($token) ? T_END_HEREDOC : $token; + while (($token = next($tokens)) && (is_array($token) ? $token[0] : $token) != $stop); + } } } -- cgit v1.2.3