ZF-9956: Zend_Log::_constructFilterFromConfig(), undefined variable $filterName, parentheses missing

Issue Type: Bug Created: 2010-06-07T06:08:32.000+0000 Last Updated: 2010-07-04T09:09:57.000+0000 Status: Resolved Fix version(s): - 1.10.7 (28/Jul/10)

Reporter: Andreas Möller (localheinz) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Log

Related issues: Attachments:



<pre class="highlight">

on line 159, the variable $filterName is undefined and an line 156 parentheses are missing.

<pre class="highlight">
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):

<pre class="highlight">
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.');


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

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.