]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/cache_functions.php
Ref overview with one decimal number (right side of dot!)
[mailer.git] / inc / libs / cache_functions.php
index 93af044caa08e1ef379860b8db4ffb43b25ae346..a3b1d0a15e77831db0bf6c1d430869a2d2f426d6 100644 (file)
@@ -223,25 +223,20 @@ class mxchange_cache
                }
        }
 
-       function cache_destroy()
-       {
-               if (FILE_READABLE($this->cache_inc))
-               {
+       // Destroy an existing cache file
+       function cache_destroy() {
+               // Is the cache file there?
+               if (FILE_READABLE($this->cache_inc)) {
                        // Remove cache file from system
                        @unlink($this->cache_inc);
-                       if (!FILE_READABLE($this->cache_inc))
-                       {
+                       if (!FILE_READABLE($this->cache_inc)) {
                                // Close cache automatically (we don't need it anymore!)
                                $this->cache_close();
-                       }
-                       else
-                       {
+                       } else {
                                // Not removed!
                                ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->cache_inc.CACHE_CANNOT_UNLINK_2);
                        }
-               }
-               else
-               {
+               } else {
                        // Does not exist!
                        ADD_FATAL(__FILE__."(<font color=\"#0000aa\">".__LINE__."</font>): ".CACHE_CANNOT_UNLINK_1.$this->cache_inc.CACHE_CANNOT_UNLINK_2);
                }
@@ -376,7 +371,7 @@ class mxchange_cache
                $line = "";
 
                // String or non-string? ;-)
-               if (is_string($value)) {
+               if ((is_string($value)) || (is_null($value))) {
                        // String...
                        $line = "\$data['".$key."'][] = \"".$value."\";\n";
                } else {