X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Flibs%2Fcache_functions.php;h=81b65c436bf598a1d3f6d6c58fcaefb4fd49d84e;hb=963e55ca1ea79e255f235e359cde9f7862191dc5;hp=e8f750bee8f55e94767d3af40d451b666b024488;hpb=89edd713e330fd16e8da1edeadfd5046296ff0d2;p=mailer.git diff --git a/inc/libs/cache_functions.php b/inc/libs/cache_functions.php index e8f750bee8..81b65c436b 100644 --- a/inc/libs/cache_functions.php +++ b/inc/libs/cache_functions.php @@ -32,11 +32,11 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ +if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } + // Caching class class mxchange_cache { @@ -155,7 +155,10 @@ class mxchange_cache if (($k == "ext_keep") && ($v == "Y")) { $cacheArray['active_extensions'][$data['ext_name']] = $v; } // END - if - } // END - if + } elseif (is_array($v)) { + // Serialize and BASE64-encode the array + $v = base64_encode(serialize($v)); + } // Write cache line to file @fwrite($this->cache_pointer, $this->add_raw_row($k, $v));