Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.0
-
Fix Version/s: 1.9.0
-
Component/s: Zend_Filter
-
Labels:None
Description
$filter = new Zend_Filter_LocalizedToNormalized(array('locale' => 'de','precision' => 0));
$val = $filter->filter( '1.000.000,00' );
$val should be 1000000 now, but is an array with date informations:
array (
[date_format] => dd.MM.yyyy,
[locale] => de,
[day] => 1,
[month] => 000,
[year] => 000
)
i posted that issue on zfforum.de:
http://www.zfforum.de/showthread.php?p=33370#post33370
One answer is that it is possible that the 1.000.000,00 matches ISO-Dateformat on
line 101: Zend_Locale_Format::checkDateFormat($value, $this->_options)
I've met similar problem while playing with locales and this filter.
When value "1,2.4" is passed to input amount, following error occours:
preg_match() expects parameter 2 to be string, array given [trunk/lib/Zend/Locale/Format.php:515]