ZF-9062: Zend_Filter_StringToUpper / Zend_Filter_StringToLower: setEnconding at Constructor

Issue Type: Bug Created: 2010-02-02T10:27:25.000+0000 Last Updated: 2010-02-02T11:10:32.000+0000 Status: Resolved Fix version(s): - 1.10.1 (10/Feb/10)

Reporter: Stephan "Bladed" de Souza (bladed) Assignee: Thomas Weidner (thomas) Tags: - Zend_Filter

Related issues: - ZF-8994



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}


Posted by Thomas Weidner (thomas) on 2010-02-02T11:10:31.000+0000

Duplicate of already fixed issue

Have you found an issue?

See the Overview section for more details.


© 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.