Adds a new PlApiHook for API handlers. The main two differences with
[platal.git] / classes / plerrorreport.php
index 520acf0..194cd1b 100644 (file)
@@ -74,7 +74,12 @@ class PlErrorReportIterator implements PlIterator
 
     public function __construct()
     {
-        $this->file = fopen(Platal::globals()->spoolroot . '/spool/tmp/site_errors', 'r');
+        $file = Platal::globals()->spoolroot . '/spool/tmp/site_errors';
+        if (file_exists($file)) {
+            $this->file = fopen($file, 'r');
+        } else {
+            $this->file = null;
+        }
     }
 
     public function next()