From: Brion Vibber <brion@pobox.com>
Date: Thu, 26 Aug 2010 20:52:03 +0000 (-0700)
Subject: Fix for failover error in status_network_tag caching; when no tags present in table... 
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8f06e3b2819936d1a9fe30b1bc44759bdcd56992;p=quix0rs-gnu-social.git

Fix for failover error in status_network_tag caching; when no tags present in table we would return an array with one empty element instead of no elements when getting the cached data.
---

diff --git a/classes/Status_network_tag.php b/classes/Status_network_tag.php
index 975392c761..7dab232897 100644
--- a/classes/Status_network_tag.php
+++ b/classes/Status_network_tag.php
@@ -79,7 +79,11 @@ class Status_network_tag extends Safe_DataObject
         if (Status_network::$cache) {
             $packed = Status_network::$cache->get($key);
             if (is_string($packed)) {
-                return explode('|', $packed);
+                if ($packed == '') {
+                    return array();
+                } else {
+                    return explode('|', $packed);
+                }
             }
         }