summaryrefslogtreecommitdiff
path: root/includes/registry.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-05-10 16:46:24 +0000
committerDries Buytaert <dries@buytaert.net>2009-05-10 16:46:24 +0000
commit43ad4ad1407ab46876e7785da6f0952b07071b99 (patch)
treede01ea340e059c1a97a2d14ca31757ea9699cac1 /includes/registry.inc
parentb9b0063a486b16e2a8780b344876f41dd565df5a (diff)
downloadbrdo-43ad4ad1407ab46876e7785da6f0952b07071b99.tar.gz
brdo-43ad4ad1407ab46876e7785da6f0952b07071b99.tar.bz2
- Patch #458566 by chx: work around PHP's curly bracket madness.
Diffstat (limited to 'includes/registry.inc')
-rw-r--r--includes/registry.inc4
1 files changed, 3 insertions, 1 deletions
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 == '}') {