Zend Framework

Zend_Filter_StringToUpper / Zend_Filter_StringToLower: setEnconding at Constructor

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Critical Critical
  • Resolution: Duplicate
  • Affects Version/s: 1.10.0
  • Fix Version/s: 1.10.1
  • Component/s: Zend_Filter
  • Labels:
    None

Description

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

Line 60

if (array_key_exists('encoding', $options))

Unknown macro: { $this->setEncoding($options); }

Making Zend_Filter_StringToUpper::setEnconding() / Zend_Filter_StringToLower::setEnconding() to throws Zend_Filter_Exception "The given encoding 'array' is not supported by mbstring")

Correction

if (array_key_exists('encoding', $options))

Unknown macro: { $this->setEncoding($options['encoding']); }

-

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);

Issue Links

Activity

Hide
Thomas Weidner added a comment -

Duplicate of already fixed issue

Show
Thomas Weidner added a comment - Duplicate of already fixed issue

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: