? drupaldown
? modules/syndication
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.632
diff -u -p -r1.632 system.module
--- modules/system/system.module	14 Oct 2008 20:44:57 -0000	1.632
+++ modules/system/system.module	19 Oct 2008 02:04:19 -0000
@@ -1018,9 +1018,9 @@ function system_theme_data() {
  *   An associative array of themes information.
  */
 function _system_theme_data() {
-  static $themes_info = array();
+  static $themes = array();
 
-  if (empty($themes_info)) {
+  if (empty($themes)) {
     // Find themes
     $themes = drupal_system_listing('/\.info$/', 'themes');
     // Find theme engines
@@ -1097,11 +1097,13 @@ function _system_theme_data() {
         }
       }
     }
-
-    $themes_info = $themes;
   }
 
-  return $themes_info;
+  $themes_copy = array();
+  foreach ($themes as $key => $theme) {
+    $themes_copy[$key] = clone $theme;
+  }
+  return $themes_copy;
 }
 
 /**
