]> git.mxchange.org Git - friendica.git/commitdiff
cache: use unserialize(false)
authorrabuzarus <rabuzarus@t-online.de>
Sun, 20 Nov 2016 16:32:37 +0000 (17:32 +0100)
committerrabuzarus <rabuzarus@t-online.de>
Sun, 20 Nov 2016 16:32:37 +0000 (17:32 +0100)
include/cache.php

index 0d12f8aefc3d54392f34e368b37c172aeaa7f42a..e8af8f9de119ef543415f2b93523790ca9e6aa87 100644 (file)
@@ -90,7 +90,7 @@ class Cache {
                        // Only return a value if the serialized value is valid.
                        // We also check if the db entry is a serialized
                        // boolean 'false' value (which we want to return).
-                       if ($cached === 'b:0;' || $value !== false) {
+                       if ($cached === serialize(false) || $value !== false) {
                                return $value;
                        }
 
@@ -111,7 +111,7 @@ class Cache {
                        // Only return a value if the serialized value is valid.
                        // We also check if the db entry is a serialized
                        // boolean 'false' value (which we want to return).
-                       if ($cached === 'b:0;' || $value !== false) {
+                       if ($cached === serialize(false) || $value !== false) {
                                return $value;
                        }
                }