From 43ad4ad1407ab46876e7785da6f0952b07071b99 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 10 May 2009 16:46:24 +0000 Subject: - Patch #458566 by chx: work around PHP's curly bracket madness. --- includes/registry.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'includes/registry.inc') diff --git a/includes/registry.inc b/includes/registry.inc index ff6bdc950..569945746 100644 --- a/includes/registry.inc +++ b/includes/registry.inc @@ -254,7 +254,9 @@ function _registry_skip_body(&$tokens) { // Scan through the rest of the tokens until we reach the matching // end brace. while ($num_braces && ($token = next($tokens))) { - if ($token == '{') { + // PHP is really logical to have three different tokens for { with + // inconsistent names and only one for a closing brace. + if ($token == '{' || (is_array($token) && ($token[0] == T_DOLLAR_OPEN_CURLY_BRACES || $token[0] == T_CURLY_OPEN))) { ++$num_braces; } elseif ($token == '}') { -- cgit v1.2.3