Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9.2, 1.10.0, 1.10.1
-
Fix Version/s: 1.10.2
-
Component/s: Zend_Filter
-
Labels:None
Description
A value filtered by Zend_Filter_LocalizedToNormalized includes a decimal separator at the end of the string even though the precision is specified as zero.
Test Case:
$n = '12345.67890';
$filter = new Zend_Filter_LocalizedToNormalized(array('locale' => 'en_US', 'precision' => 0));
Zend_Debug::dump($n, 'original');
Zend_Debug::dump($filter->filter($n), 'filtered');
Actual Output:
original string(11) "12345.67890" filtered string(6) "12345."
Expected Output:
original string(11) "12345.67890" filtered string(5) "12345"
Fixed with r21111