[geeklog-cvs] geeklog: Removed PHP 4 compatibility code from error handling (f...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Nov 6 08:37:25 EDT 2010


changeset 8012:52b4c04c1362
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/52b4c04c1362
user: Dirk Haun <dirk at haun-online.de>
date: Sat Nov 06 13:08:39 2010 +0100
description:
Removed PHP 4 compatibility code from error handling (feature request #0001217)

diffstat:

 public_html/lib-common.php |  23 +++++++----------------
 1 files changed, 7 insertions(+), 16 deletions(-)

diffs (47 lines):

diff -r dd109f4a7362 -r 52b4c04c1362 public_html/lib-common.php
--- a/public_html/lib-common.php	Sat Nov 06 13:01:00 2010 +0100
+++ b/public_html/lib-common.php	Sat Nov 06 13:08:39 2010 +0100
@@ -2,7 +2,7 @@
 
 /* Reminder: always indent with 4 spaces (no tabs). */
 // +---------------------------------------------------------------------------+
-// | Geeklog 1.6                                                               |
+// | Geeklog 1.8                                                               |
 // +---------------------------------------------------------------------------+
 // | lib-common.php                                                            |
 // |                                                                           |
@@ -72,16 +72,12 @@
 *
 */ 
 if (function_exists('set_error_handler')) {
-    if (PHP_VERSION >= 5) {
-        /* Tell the error handler to use the default error reporting options.
-         * You may like to change this to use it in more/less cases, if so,
-         * just use the syntax used in the call to error_reporting() above.
-         */
-        $defaultErrorHandler = set_error_handler('COM_handleError',
-                                                 error_reporting());
-    } else {
-        $defaultErrorHandler = set_error_handler('COM_handleError');
-    }
+    /* Tell the error handler to use the default error reporting options.
+     * You may like to change this to use it in more/less cases, if so,
+     * just use the syntax used in the call to error_reporting() above.
+     */
+    $defaultErrorHandler = set_error_handler('COM_handleError',
+                                             error_reporting());
 }
 
 /**
@@ -6766,11 +6762,6 @@
         return;
     }
 
-    // If in PHP4, then respect error_reporting
-    if ((PHP_VERSION < 5) && (($errno & error_reporting()) == 0)) {
-        return;
-    }
-
     /*
      * If we have a root user, then output detailed error message:
      */



More information about the geeklog-cvs mailing list