summaryrefslogtreecommitdiff
path: root/community/mythplugins/php55.patch
blob: eba7fd696d517d5d117d02ba1c9c26f78037d44e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/mythweb/includes/errors.php
+++ b/mythweb/includes/errors.php
@@ -103,6 +103,9 @@
 /**/
     function error_handler($errno, $errstr, $errfile, $errline, $vars) {
         global $db;
+    // Leave early if we haven't requested reports from this kind of error
+        if (!($errno & error_reporting()))
+            return;
         if (class_exists('Translate'))
             $errstr = Translate::find()->string($errstr);
     // Try to auto-repair damaged SQL tables
@@ -113,9 +116,6 @@
             add_error('Regular Expression Error:  '.$match[1]);
             return;
         }
-    // Leave early if we haven't requested reports from this kind of error
-        if (!($errno & error_reporting()))
-            return;
     // Fatal errors should report considerably more detail
         if (in_array($errno, array(E_USER_ERROR, E_ERROR))) {
         // What type of error?