Index: trunk/phase3/tests/phpunit/languages/LanguageMlTest.php |
— | — | @@ -28,5 +28,7 @@ |
29 | 29 | $this->assertEquals( '.12345', $this->lang->formatNum( '.12345' ) ); |
30 | 30 | $this->assertEquals( '-12,00,000', $this->lang->formatNum( '-1200000' ) ); |
31 | 31 | $this->assertEquals( '-98', $this->lang->formatNum( '-98' ) ); |
| 32 | + $this->assertEquals( '-98', $this->lang->formatNum( -98 ) ); |
| 33 | + $this->assertEquals( '-1,23,45,678', $this->lang->formatNum( -12345678 ) ); |
32 | 34 | } |
33 | 35 | } |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -2725,7 +2725,7 @@ |
2726 | 2726 | $sign = ""; |
2727 | 2727 | if ( intval( $_ ) < 0 ) { |
2728 | 2728 | // For negative numbers apply the algorithm like positive number and add sign. |
2729 | | - $sign = $_[0]; |
| 2729 | + $sign = "-"; |
2730 | 2730 | $_ = substr( $_,1 ); |
2731 | 2731 | } |
2732 | 2732 | $numberpart = array(); |