Index: filter.module
===================================================================
--- filter.module	(revision 4423)
+++ filter.module	(working copy)
@@ -760,15 +760,17 @@
 
     // Check for a cached version of this piece of text.
     $id = $format .':'. md5($text);
-    static $cache = array();
+    static $cache;
+    $cache = new stdClass();
     
     // Prevent duplicate cache looks up for same filter id.
-    if (!isset($cache[$id])) {
-      $cached = cache_get($id, 'cache_filter');
-      $cache[$id] = $cached;
+    if (!isset($cache->$id)) {
+      if ($cached = cache_get($id, 'cache_filter')) {
+        $cache->$id = $cached;
+      }
     }
-    if ($cache[$id]) {
-      return $cache[$id]->data;
+    if ($cache->$id) {
+      return $cache->$id->data;
     }
 
     // See if caching is allowed for this format.
