Commit bd91faf6 authored by Dries's avatar Dries

- Patch #277440 by R.Muilwijk: fixed bug caching integers and doubles. Fixes...

- Patch #277440 by R.Muilwijk: fixed bug caching integers and doubles.  Fixes 2 of the 3 failing cache tests.
parent 53c395c3
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment