summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2008-07-02 20:42:25 (GMT)
committerDries Buytaert2008-07-02 20:42:25 (GMT)
commitbd91faf66c49d2b410f75f32df9442cb7a0f9bed (patch)
treea74dae4423e29db68482cf520e6fe7f3691b4ad9
parent53c395c33ea45d0a9ac40706e930ffd03dcb89e6 (diff)
- Patch #277440 by R.Muilwijk: fixed bug caching integers and doubles. Fixes 2 of the 3 failing cache tests.
-rw-r--r--includes/cache.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/cache.inc b/includes/cache.inc
index e21346a..518ca31 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;
}