Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.10.0
-
Fix Version/s: 1.10.3
-
Component/s: Zend_Measure
-
Labels:None
Description
Dears,
In this code (line 287)
$slength = strlen($value);
$length = 0;
for($i = 1; $i <= 25; ++$i) {
if ($value[$slength - $i] != '0') {
$length = 26 - $i;
break;
}
}
$this->_value = Zend_Locale_Math::round($value, $length);
$this->_type = $type;
A possible error can occur if $slength is < 25...
We will have $value[$indexNegative].
A simple fix would be
for($i = 1; $i <= $slength && $i <= 25; ++$i) {
Regards,
Raphaël Dehousse
This has been introduced in revision 18493:
ZF-8009Zend_Measure:ZF-8009Zend_Measure: