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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 25 + 8 = ?

 
 [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.