Issues

ZF-2522: Zend_Filter_Inflector __construct params ignored

Issue Type: Bug Created: 2008-01-29T18:29:36.000+0000 Last Updated: 2008-03-21T16:25:18.000+0000 Status: Resolved Fix version(s): - 1.5.0 (17/Mar/08)

Reporter: Aldo Armiento (aldo) Assignee: Ralph Schindler (ralph) Tags: - Zend_Filter

Related issues: Attachments:

Description

@version $Id: Inflector.php 7078 2007-12-11 14:29:33Z matthew $

Parameters $throwTargetExceptionsOn and $targetReplacementIdentifer in Zend_Filter_Inflector __construct method are ignored if boolean false.

Actual code:

<pre class="highlight">
    if ($throwTargetExceptionsOn != null) {
        $this->setThrowTargetExceptionsOn($throwTargetExceptionsOn);
    }

    if ($targetReplacementIdentifer != null) {
        $this->setTargetReplacementIdentifier($targetReplacementIdentifer);
    }

Proposed fix:

<pre class="highlight">
    if ($throwTargetExceptionsOn !== null) {
        $this->setThrowTargetExceptionsOn($throwTargetExceptionsOn);
    }

    if ($targetReplacementIdentifer !== null) {
        $this->setTargetReplacementIdentifier($targetReplacementIdentifer);
    }

Comments

Posted by Ralph Schindler (ralph) on 2008-02-20T16:08:07.000+0000

Fixed in r8226.

The targetReplacementIdentifier actually should be checking that the string is not != ''. The exception flag was fixed as well.

-ralph

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts