Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.18.2

Bug #16435 improper use of substr() in lang.pl.php
Submitted: 2009-07-14 05:05 UTC
From: santaslh Assigned: kouber
Status: Closed Package: Numbers_Words (version 0.16.1)
PHP Version: 5.2.5 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2009-07-14 05:05 UTC] santaslh (John Smith)
Description: ------------ in function _get_numlevel($num) line $num = (int)substr($num, -3); doesn't return desired result when strlen($num) < 3 see: http://php.net/manual/en/function.substr.php#75999 Test script: --------------- print Numbers_Words::toCurrency(1,'pl','PLN'); print Numbers_Words::toCurrency(3,'pl','PLN'); Expected result: ---------------- jeden złotych trzy złotych Actual result: -------------- jeden złoty trzy złote

Comments

 [2009-07-14 05:12 UTC] santaslh (John Smith)
ugh... mixed up Expected with Actual result, should be Expected result: ---------------- jeden złoty trzy złote Actual result: -------------- jeden złotych trzy złotych
 [2009-07-16 22:32 UTC] kouber (Kouber Saparev)
-Status: Open +Status: Analyzed
 [2009-10-27 16:27 UTC] kouber (Kouber Saparev)
-Assigned To: +Assigned To: kouber
 [2010-01-12 21:44 UTC] kouber (Kouber Saparev)
-Status: Analyzed +Status: Closed
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.