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 #2076

bug in /Words/lang.ru.php

Details

Submitted2004-08-06 12:59 UTC
Fromigorag at dotalfa dot ru
Assignedblindman
StatusClosed
PackageNumbers_Words
PHP Version4.3.3
OSwindows
Roadmaps(Not assigned)

Comments

[2004-08-06 12:59 UTC] igorag at dotalfa dot ru

Description:
------------
There are couple errors in function calls.
Method _toWordsWithCase() has 3 parameters, but is is called with 5 parameters. This code gives a result with wrong gender on russian currency (and other).

To solve this problems it is necessary to remove 4th and 5th parameters from function call.

Reproduce code:
---------------
$curr_names = $this->_currency_names[$int_curr];
$ret = trim($this->_toWordsWithCase($decimal, $case, 0, '', $curr_names[0][0]));
$ret .= $this->_sep . $curr_names[0][$case];

if ($fraction !== false) {
$ret .= $this->_sep . trim($this->_toWordsWithCase($fraction, $case, 0, '', $curr_names[1][0]));
$ret .= $this->_sep . $curr_names[1][$case];
}