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

Bug #1488 towords error on PHP5
Submitted: 2004-05-24 20:02 UTC
From: khlo at global-centre dot com Assigned: makler
Status: Closed Package: Numbers_Words
PHP Version: 5.0.0RC1 (Release Candidate 1) OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-05-24 20:02 UTC] khlo at global-centre dot com
Description: ------------ if (!in_array('towords',get_class_methods($classname))) { does not work correctly on PHP 5. Using if (!in_array('toWords',get_class_methods($classname))) { will fix this bug. Reproduce code: --------------- Call Numbers_Words::toWords() Expected result: ---------------- toWords() returns word version of number Actual result: -------------- PEAR_Error returned. print_r() of it: PEAR_Error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code] => [message] => Unable to find toWords method in 'Numbers_Words_en_US' class [userinfo] => [backtrace] => Array ( [0] => Array ( [file] => C:\php5\PEAR\PEAR.php [line] => 538 [function] => PEAR_Error [class] => PEAR_Error [type] => -> ) [1] => Array ( [file] => C:\php5\PEAR\Numbers\Words.php [line] => 135 [function] => raiseError [class] => Numbers_Words [type] => -> ) [2] => Array ( [file] => C:\php5\PEAR\Numbers\Words.php [line] => 69 [function] => raiseError [class] => Numbers_Words [type] => -> ) [3] => Array ( [file] => c:\program files\apache group\Apache\htdocs\private\numberword\index.php [line] => 5 [function] => toWords [class] => Numbers_Words [type] => -> ) ) [callback] => )

Comments

 [2004-05-25 07:14 UTC] makler
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/packages.php Thank you for sending the fix. I have changed towords to toWords in Words.php file. No other "towords" small letter calls were detected.