]> git.mxchange.org Git - mailer.git/blobdiff - inc/classes/cachesystem.class.php
Huge patchset (I don't recall all details):
[mailer.git] / inc / classes / cachesystem.class.php
index 71bf450d674c4efcb53cd00255268b2b30d5cf37..5a606fb93eb574d57a68be282d49ff46601a1834 100644 (file)
@@ -139,9 +139,6 @@ class CacheSystem {
                                        if (($k == 'ext_keep') && ($v == 'Y')) {
                                                $GLOBALS['cache_array']['always_active'][$data['ext_name']] = $v;
                                        } // END - if
-                               } elseif (is_array($v)) {
-                                       // Serialize and BASE64-encode the array
-                                       $v = base64_encode(serialize($v));
                                } elseif ($this->name == 'config') {
                                        // Configuration
                                        $GLOBALS['cache_array']['config'][$data['config']][$k] = $v;
@@ -168,7 +165,7 @@ class CacheSystem {
                                        $GLOBALS['cache_array']['refsystem'][$k][$data['id']] = $v;
                                } elseif ($this->name == 'revision') {
                                        // Revision data
-                                       $GLOBALS['cache_array']['revision'][$k] = $v;
+                                       $GLOBALS['cache_array']['revision'][$k][0] = $v;
                                } elseif ($this->name == 'themes') {
                                        // Themes
                                        if ($k == 'theme_path') {
@@ -179,6 +176,9 @@ class CacheSystem {
                                } elseif ($this->name == 'imprint') {
                                        // Imprint
                                        $GLOBALS['cache_array']['imprint'][$k][$data['imprint_id']] = $v;
+                               } elseif (is_array($v)) {
+                                       // Serialize and BASE64-encode the array
+                                       $v = base64_encode(serialize($v));
                                } else {
                                        // Finialize the cache and close it
                                        $this->finalize();
@@ -491,6 +491,9 @@ class CacheSystem {
                                // False
                                $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = false;\n";
                        }
+               } elseif (isset($value[0])) {
+                       // These lines needs fixing
+                       debug_report_bug('Invalid entry with [0] found. key=' . $key);
                } else {
                        // Non-string
                        $line = '$this->' . $prefix . "['".$this->name."']['" . $key . "']" . $extender . " = " . $value . ";\n";