root

Changeset 254

Show
Ignore:
Timestamp:
09/30/08 14:01:12 (2 years ago)
Author:
wbond
Message:

Fixed an issue with not passing the currency to the fMoney constructor unformat callback

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fMoney.php

    r214 r254 Hide Line Numbers
    148148     * Allows setting a callback to clean any formatted values so they can be passed to {@link fNumber} 
    149149     *  
    150      * @param  callback $callback  The callback to pass formatted strings to. Should accept a formatted string and return a string suitable to passing to the fNumber constructor. 
     150     * @param  callback $callback  The callback to pass formatted strings to. Should accept a formatted string and a currency code and return a string suitable to passing to the fNumber constructor. 
    151151     * @return void 
    152152     */ 
     
    233233        // Unformat any money value 
    234234        if (self::$unformat_callback !== NULL) { 
    235             $amount = call_user_func(self::$unformat_callback, $amount); 
     235            $amount = call_user_func(self::$unformat_callback, $amount, $this->currency); 
    236236        } else { 
    237237            $amount = str_replace(