Index: includes/registry.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/registry.inc,v
retrieving revision 1.15
diff -u -9 -p -r1.15 registry.inc
--- includes/registry.inc	10 May 2009 16:46:23 -0000	1.15
+++ includes/registry.inc	12 May 2009 19:05:52 -0000
@@ -256,16 +256,25 @@ function _registry_skip_body(&$tokens) {
   while ($num_braces && ($token = next($tokens))) {
     // 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 == '}') {
       --$num_braces;
     }
+    // Consume strings manually as workaround for a bug in PHP < 5.2.3 (see
+    // http://drupal.org/node/368116).
+    elseif ($token == '"' || $token == '`') {
+      $stop_token = $token;
+      while (($token = next($tokens)) && $token != $stop_token);
+    }
+    elseif (is_array($token) && $token[0] == T_START_HEREDOC) {
+      while (($token = next($tokens)) && !(is_array($token) && $token[0] == T_END_HEREDOC));
+    }
   }
 }
 
 /**
  * @} End of "defgroup registry".
  */
 
