Do not explicitely check on null but rather on the code being empty. This adapts...
authorGunnar Wrobel <p@rdus.de>
Mon, 12 Apr 2010 08:55:16 +0000 (10:55 +0200)
committerGunnar Wrobel <p@rdus.de>
Mon, 12 Apr 2010 08:55:16 +0000 (10:55 +0200)
framework/Exception/lib/Horde/Exception/Prior.php

index 7e2c66b..37dffb2 100644 (file)
@@ -24,7 +24,7 @@ class Horde_Exception_Prior extends Horde_Exception
     {
         if (is_object($message) &&
             method_exists($message, 'getMessage')) {
-            if (is_null($code) &&
+            if (empty($code) &&
                 method_exists($message, 'getCode')) {
                 $code = $message->getCode();
             }