ZF-9955: Zend_Log::_constructWriterFromConfig(), undefined variable $writerName
Description
In
Zend_Log::_constructWriterFromConfig($config);
on line 135, the variable {{$writerName}} is undefined and on line 132 parentheses are missing.
if (!$writer instanceof Zend_Log_Writer_Abstract) {
/** @see Zend_Log_Exception */
require_once 'Zend/Log/Exception.php';
throw new Zend_Log_Exception("{$writerName} does not extend Zend_Log_Writer_Abstract!");
}
A fix could be (use of double quotation marks is discouraged, by the way):
if (!($writer instanceof Zend_Log_Writer_Abstract)) {
/** @see Zend_Log_Exception */
require_once 'Zend/Log/Exception.php';
$writerName = is_object($writer)
? get_class($writer)
: 'The specified writer'
;
throw new Zend_Log_Exception($writerName . 'does not extend Zend_Log_Writer_Abstract!');
}
Comments
Posted by Ramon Henrique Ornelas (ramon) on 2010-07-04T08:22:45.000+0000
Fixed in trunk revision r22524.
Posted by Ramon Henrique Ornelas (ramon) on 2010-07-04T09:10:24.000+0000
Applied to branch release-1.10 r22527