]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
hide errors when deleting cached status_network_tag keys
authorEvan Prodromou <evan@status.net>
Fri, 10 Jun 2011 22:57:17 +0000 (18:57 -0400)
committerEvan Prodromou <evan@status.net>
Fri, 10 Jun 2011 22:57:17 +0000 (18:57 -0400)
classes/Status_network.php
classes/Status_network_tag.php

index 8e8569e52a63db7325497e865ede1a6806dd4948..c1d4cd26f389ce46df146bc4110e1f47ab6eafb4 100644 (file)
@@ -58,7 +58,7 @@ class Status_network extends Safe_DataObject
 
     // XXX: made public so Status_network_tag can eff with it
     public static $cache = null;
-    static $cacheInitialized = false;
+    public static $cacheInitialized = false;
     static $base = null;
     static $wildcard = null;
 
index 00ff0d85200c8938421b4e9c818fe7455f75f673..4a7c3b51ff15311a903f1ce4d303d80a32e4defa 100644 (file)
@@ -111,8 +111,10 @@ class Status_network_tag extends Safe_DataObject
     function decache()
     {
         $key = 'status_network_tags:' . $this->site_id;
-        if (Status_network::$cache) {
-            Status_network::$cache->delete($key);
+        if (Status_network::$cache || Status_network::$cacheInitialized) {
+            // FIXME: this was causing errors, so I'm hiding them.
+            // I'm a big chicken and lazy.
+            @Status_network::$cache->delete($key);
         }
     }