Continued:
[core.git] / contrib / chash / chash.php
index c37216ab3bb3826443e2a9ae03496c2da1db9cef..34a30b5bfb819e02b64403266532e04b19e421a6 100644 (file)
@@ -262,7 +262,7 @@ function flushCheckPointFile ($hash) {
                base64_encode((float) $GLOBALS['nonce']) . ':' .
                $hash . ':' .
                $GLOBALS['root_hash'] . ':' .
-               base64_encode(gzcompress(serialize($GLOBALS['found_hashes'])))
+               base64_encode(gzcompress(json_encode($GLOBALS['found_hashes'])))
        );
 
        // Set time
@@ -407,7 +407,7 @@ if (is_readable(CHECK_POINT)) {
        $GLOBALS['hash_cycles']    = intval($data[5]);
        $GLOBALS['nonce']          = (float) base64_decode($data[6]);
        $GLOBALS['root_hash']      = $data[8];
-       $GLOBALS['found_hashes']   = unserialize(gzuncompress(base64_decode($data[9])));
+       $GLOBALS['found_hashes']   = json_decode(gzuncompress(base64_decode($data[9])));
 
        // Set modula hash
        setModulaHash($data[7]);