- Patch #277440 by R.Muilwijk: fixed bug caching integers and doubles. Fixes 2 of the 3 failing cache tests.

merge-requests/26/head
Dries Buytaert 2008-07-02 20:42:25 +00:00
parent 53c395c33e
commit bd91faf66c
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}