From bd91faf66c49d2b410f75f32df9442cb7a0f9bed Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 2 Jul 2008 20:42:25 +0000 Subject: - Patch #277440 by R.Muilwijk: fixed bug caching integers and doubles. Fixes 2 of the 3 failing cache tests. --- includes/cache.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/cache.inc b/includes/cache.inc index e21346a9e..518ca313e 100644 --- a/includes/cache.inc +++ b/includes/cache.inc @@ -102,7 +102,7 @@ function cache_get($cid, $table = 'cache') { */ function cache_set($cid, $data, $table = 'cache', $expire = CACHE_PERMANENT, $headers = NULL) { $serialized = 0; - if (is_object($data) || is_array($data)) { + if (!is_string($data)) { $data = serialize($data); $serialized = 1; } -- cgit v1.2.3