Author: ihabunek Date: Sat Sep 1 09:45:52 2012 New Revision: 1379728 URL: http://svn.apache.org/viewvc?rev=1379728&view=rev Log: Removed redundant type check in Logger::forcedLog(). The same check is made in LoggerLoggingEvent constructor. The Exception type hint for $throwable was removed from the constructor to prevent errors if a non-exception is given here. Any non-exceptions will just be ignored anyway. Modified: logging/log4php/trunk/src/main/php/Logger.php logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php Modified: logging/log4php/trunk/src/main/php/Logger.php URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/Logger.php?rev=1379728&r1=1379727&r2=1379728&view=diff ============================================================================== --- logging/log4php/trunk/src/main/php/Logger.php (original) +++ logging/log4php/trunk/src/main/php/Logger.php Sat Sep 1 09:45:52 2012 @@ -202,9 +202,6 @@ class Logger { * @param mixed $message message to log */ public function forcedLog($fqcn, $throwable, LoggerLevel $level, $message) { - if (!($throwable instanceof Exception)) { - $throwable = null; - } $this->callAppenders(new LoggerLoggingEvent($fqcn, $this, $level, $message, null, $throwable)); } Modified: logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php?rev=1379728&r1=1379727&r2=1379728&view=diff ============================================================================== --- logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php (original) +++ logging/log4php/trunk/src/main/php/LoggerLoggingEvent.php Sat Sep 1 09:45:52 2012 @@ -117,7 +117,7 @@ class LoggerLoggingEvent { * @param integer $timeStamp the timestamp of this logging event. * @param Exception $throwable The throwable associated with logging event */ - public function __construct($fqcn, $logger, $priority, $message, $timeStamp = null, Exception $throwable = null) { + public function __construct($fqcn, $logger, $priority, $message, $timeStamp = null, $throwable = null) { $this->fqcn = $fqcn; if($logger instanceof Logger) { $this->logger = $logger;