diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-05-16 16:04:42 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-05-16 16:04:42 +0000 |
commit | 47413f64604422556a32b4aa6594a659101413ff (patch) | |
tree | c0987e1bcd1e7105d22492bd0a65e5d70f433997 /includes/registry.inc | |
parent | f577c125e84bc3a1f30bcc40105788d0547a534a (diff) | |
download | brdo-47413f64604422556a32b4aa6594a659101413ff.tar.gz brdo-47413f64604422556a32b4aa6594a659101413ff.tar.bz2 |
- Patch #368116 by chx, c960657: fixed bug in tokenizer for registry.
Diffstat (limited to 'includes/registry.inc')
-rw-r--r-- | includes/registry.inc | 6 |
1 files changed, 6 insertions, 0 deletions
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); + } } } |