Index: includes/registry.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/registry.inc,v
retrieving revision 1.27
diff -u -r1.27 registry.inc
--- includes/registry.inc	28 Dec 2009 10:48:51 -0000	1.27
+++ includes/registry.inc	19 Feb 2010 15:24:06 -0000
@@ -123,24 +123,27 @@
 function _registry_parse_files($files) {
   $parsed_files = array();
   foreach ($files as $filename => $file) {
-    $filectime = filectime($filename);
-    $filemtime = filemtime($filename);
-    $modified_file = !isset($file['filectime']) || !isset($file['filemtime'])
-                || $filectime != $file['filectime'] || $filemtime != $file['filemtime'];
-    if ($modified_file) {
-      $contents = file_get_contents($filename);
-      $parsed_files[] = $filename;
-      // We update the filectime/filemtime after we've saved the files resources
-      // rather than here, so if we don't make it through this rebuild, the next
-      // run will reparse the file.
-      _registry_parse_file($filename, $contents, $file['module'], $file['weight']);
-      db_merge('registry_file')
-        ->key(array('filename' => $filename))
-        ->fields(array(
-          'filectime' => $filectime,
-          'filemtime' => $filemtime,
-        ))
-        ->execute();
+    if (file_exists($filename)) {
+      $filectime = filectime($filename);
+      $filemtime = filemtime($filename);
+
+      $modified_file = !isset($file['filectime']) || !isset($file['filemtime'])
+                  || $filectime != $file['filectime'] || $filemtime != $file['filemtime'];
+      if ($modified_file) {
+        $contents = file_get_contents($filename);
+        $parsed_files[] = $filename;
+        // We update the filectime/filemtime after we've saved the files resources
+        // rather than here, so if we don't make it through this rebuild, the next
+        // run will reparse the file.
+        _registry_parse_file($filename, $contents, $file['module'], $file['weight']);
+        db_merge('registry_file')
+          ->key(array('filename' => $filename))
+          ->fields(array(
+            'filectime' => $filectime,
+            'filemtime' => $filemtime,
+          ))
+          ->execute();
+      }
     }
   }
   return $parsed_files;
