Index: includes/registry.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/registry.inc,v
retrieving revision 1.12
diff -u -9 -p -r1.12 registry.inc
--- includes/registry.inc	22 Feb 2009 17:55:29 -0000	1.12
+++ includes/registry.inc	25 Feb 2009 19:01:01 -0000
@@ -248,16 +248,25 @@ 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 == '{') {
       ++$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".
  */
 
