Issues

ZF-9062: Zend_Filter_StringToUpper / Zend_Filter_StringToLower: setEnconding at Constructor

Description

When try to set enconding on object construct the setEncoding is incorrect set as Array.

{panel:title=Line 60} if (array_key_exists('encoding', $options)) { $this->setEncoding($options); } {panel} Making Zend_Filter_StringToUpper::setEnconding() / Zend_Filter_StringToLower::setEnconding() to throws Zend_Filter_Exception "The given encoding 'array' is not supported by mbstring")

{panel:title=Correction} if (array_key_exists('encoding', $options)) { $this->setEncoding($options['encoding']); } {panel}

- {panel:title=Example} <?php

require 'Zend/Loader.php';

Zend_Loader::loadClass('Zend_Filter_StringToUpper'); Zend_Loader::loadClass('Zym_Debug'); Zend_Loader::loadClass('Zend_Debug'); Zend_Loader::loadClass('Zend_Version');

$filter = new Zend_Filter_StringToUpper('ISO-8859-1'); $value = $filter->filter('T├ęste'); Zend_Debug::dump($value); Zend_Debug::dump(Zend_Version::VERSION); {panel}

Comments

Duplicate of already fixed issue