PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Numbers » Numbers_Words » Bug #1488

towords error on PHP5

Details

Submitted2004-05-24 20:02 UTC
Fromkhlo at global-centre dot com
Assignedmakler
StatusClosed
PackageNumbers_Words
PHP Version5.0.0RC1 (Release Candidate 1)
Roadmaps(Not assigned)

Comments

[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] =>
)