ZF-9956: Zend_Log::_constructFilterFromConfig(), undefined variable $filterName, parentheses missing
Description
In
Zend_Log::_constructFilterFromConfig($config);
on line 159, the variable {{$filterName}} is undefined and an line 156 parentheses are missing.
if (!$filter instanceof Zend_Log_Filter_Interface) {
/** @see Zend_Log_Exception */
require_once 'Zend/Log/Exception.php';
throw new Zend_Log_Exception("{$filterName} does not implement Zend_Log_Filter_Interface");
}
A fix could be (again, use of double quotation marks is discouraged, by the way):
if (!($filter instanceof Zend_Log_Filter_Interface)) {
/** @see Zend_Log_Exception */
require_once 'Zend/Log/Exception.php';
$filterName = is_object($filter)
? get_class($filter)
: 'The specified filter'
;
throw new Zend_Log_Exception($filterName . 'does not implement Zend_Log_Filter_Interface.');
}
Comments
Posted by Ramon Henrique Ornelas (ramon) on 2010-07-04T08:40:33.000+0000
Fixed in trunk r22526.
Posted by Ramon Henrique Ornelas (ramon) on 2010-07-04T09:09:56.000+0000
Applied to branch release-1.10 r22527