debug_report_bug() should be used as a replacement for app_die() calls
[mailer.git] / inc / classes / cachesystem.class.php
index 5892900b3d8c7ec4f5344386e7061a9f8a28a05c..4c4878aa574e6b4811b44e785b5b58d6dc2007e8 100644 (file)
@@ -108,7 +108,7 @@ class CacheSystem {
 
                        // Create file
                        if ($this->isCacheReadable()) changeMode($this->fqfn, 0666);
-                       $this->pointer = fopen($this->fqfn, 'w') or app_die(__METHOD__, __LINE__, "Cannot write to cache ".$this->fqfn." !");
+                       $this->pointer = fopen($this->fqfn, 'w') or debug_report_bug(__METHOD__, __LINE__, 'Cannot write to cache ' . $this->fqfn . ' !');
 
                        // Add open PHP tag
                        fwrite($this->pointer, "<?php\n");
@@ -188,7 +188,7 @@ class CacheSystem {
                                        $this->removeCacheFile(true);
 
                                        // Unsupported cache found!
-                                       debug_report_bug('Unsupported cache ' . $this->name . ' detected.');
+                                       debug_report_bug(__METHOD__, __LINE__, 'Unsupported cache ' . $this->name . ' detected.');
                                }
 
                                // Write cache line to file
@@ -260,7 +260,7 @@ class CacheSystem {
                        } // END - if
                } else {
                        // Cache file not found or not readable
-                       debug_report_bug($this->name);
+                       debug_report_bug(__METHOD__, __LINE__, $this->name);
                        addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMaskedMessage('CACHE_CANNOT_LOAD', $this->fqfn));
 
                        // Try to remove it
@@ -500,7 +500,7 @@ class CacheSystem {
                        }
                } elseif (isset($value[0])) {
                        // These lines needs fixing
-                       debug_report_bug('Invalid entry with [0] found. key=' . $key);
+                       debug_report_bug(__METHOD__, __LINE__, 'Invalid entry with [0] found. key=' . $key);
                } else {
                        // Non-string
                        $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = ' . $value . ";\n";