Prevents a file_get_contents warning when retrieving sql errors.
authorStéphane Jacob <sj@m4x.org>
Mon, 27 Jul 2009 21:10:18 +0000 (23:10 +0200)
committerStéphane Jacob <sj@m4x.org>
Mon, 27 Jul 2009 21:10:18 +0000 (23:10 +0200)
modules/core.php

index 92ca70a..0db98a5 100644 (file)
@@ -180,7 +180,7 @@ class CoreModule extends PLModule
     function handler_sqlerror(&$page) {
         global $globals;
         $page->coreTpl('sql_errors.tpl');
-        $file = file_get_contents($globals->spoolroot . '/spool/tmp/query_errors');
+        $file = @file_get_contents($globals->spoolroot . '/spool/tmp/query_errors');
         if ($file !== false) {
             $page->assign('errors', utf8_encode($file));
         }