ZF-2686: Unterminated Loop in Zend_Locale_Format::toNumber
Description
$number = '257';
$format = '#,##'; // wrong format
$locale = new Zend_Locale('de');
Zend_Locale_Format::toNumber($number, array('locale' => $locale, 'number_format'=>$format));
$number = '257';
$format = '#,##'; // wrong format
$locale = new Zend_Locale('de');
Zend_Locale_Format::toNumber($number, array('locale' => $locale, 'number_format'=>$format));
Comments
Posted by Thomas Weidner (thomas) on 2008-02-19T13:56:42.000+0000
Please give us the following data for reproduction: OS, PHP Version, ZF SVN Version, set locale from php, bcmath enabled
Posted by Thomas Weidner (thomas) on 2008-02-19T15:34:57.000+0000
Downgrading to should have and major as we have not got any data for reproduction.
This sort of issue has already been fixed in past for a specific OS so we are not sure if the reporter uses a old release or the failure is unfixed in his OS.
Posted by Marc Bennewitz (GIATA mbH) (mben) on 2008-02-19T16:30:45.000+0000
I have test it in the current revision 8180
Posted by Thomas Weidner (thomas) on 2008-02-20T16:21:44.000+0000
toNumber now throws an exception on wrong formats.... In your case an zero is missing.
Correct formats have to limit the number with an "0" before the precision. This was fixed with ZF-8229