ZF-2522: Zend_Filter_Inflector __construct params ignored
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:
if ($throwTargetExceptionsOn != null) {
$this->setThrowTargetExceptionsOn($throwTargetExceptionsOn);
}
if ($targetReplacementIdentifer != null) {
$this->setTargetReplacementIdentifier($targetReplacementIdentifer);
}
Proposed fix:
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