[dev] [cvs] commit: framework/Horde/Horde ErrorHandler.php

Chuck Hagenbuch chuck at horde.org
Thu Mar 5 01:13:45 UTC 2009


Quoting Michael M Slusarz <slusarz at horde.org>:

>   Log:
>   Clean up PHP 5 code.

Why this part?

-        if (!($errno & self::$_mask)) {
-            return;
+        if ($errno & self::$_mask) {
+            self::$_errors[] = array(
+                'no' => $errno,
+                'str' => self::_cleanErrorString($errstr),
+                'file' => $errfile,
+                'line' => $errline,
+                'trace' => self::_errorBacktrace(),
+            );
          }
-
-        self::$_errors[] = array(
-            'no' => $errno,
-            'str' => self::_cleanErrorString($errstr),
-            'file' => $errfile,
-            'line' => $errline,
-            'trace' => self::_errorBacktrace(),
-        );

That just increases the nesting level, no?

Also here:

-        $headers = headers_list();
-        foreach ($headers as $header) {
+        foreach (headers_list() as $header) {

Is repeated function calls in foreach no longer an issue?

-chuck


More information about the dev mailing list