Show
Ignore:
Timestamp:
05/06/09 21:02:29 (1 year ago)
Author:
wbond
Message:

Fixed a bug in fJSON::decode() where the pure PHP version would only return one key per JSON object when returning associative arrays

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fJSON.php

    r560 r563 Hide Line Numbers
    1818 * @link       http://flourishlib.com/fJSON 
    1919 *  
    20  * @version    1.0.0b3 
     20 * @version    1.0.0b4 
     21 * @changes    1.0.0b4  Fixed a bug with ::decode() where JSON objects could lose all but the first key: value pair [wb, 2009-05-06] 
    2122 * @changes    1.0.0b3  Updated the class to be consistent with PHP 5.2.9+ for encoding and decoding invalid data [wb, 2009-05-04] 
    2223 * @changes    1.0.0b2  Changed @ error suppression operator to `error_reporting()` calls [wb, 2009-01-26]  
     
    416417             
    417418            if ($ref_match) { 
    418                 $stack[] = array($type, $match); 
     419                $stack[] = array($type, &$match); 
    419420                $stack_end = end($stack); 
    420421            } 
     
    457458            } 
    458459            $last = $type; 
    459  
     460            unset($match); 
    460461        } 
    461462