From 8f06e3b2819936d1a9fe30b1bc44759bdcd56992 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 26 Aug 2010 13:52:03 -0700 Subject: [PATCH] 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. --- classes/Status_network_tag.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); + } } } -- 2.39.5