ZF-9955: Zend_Log::_constructWriterFromConfig(), undefined variable $writerName

Issue Type: Bug Created: 2010-06-07T05:49:19.000+0000 Last Updated: 2010-07-04T09:10:24.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 135, the variable $writerName is undefined and on line 132 parentheses are missing.

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

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


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

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.