Index: trunk/phase3/includes/db/DatabasePostgres.php |
— | — | @@ -814,7 +814,9 @@ |
815 | 815 | $limit = strlen( $text )-1; |
816 | 816 | $output = array(); |
817 | 817 | } |
818 | | - if( '{}' != $text ) |
| 818 | + if( '{}' == $text ) { |
| 819 | + return $output; |
| 820 | + } |
819 | 821 | do { |
820 | 822 | if ( '{' != $text{$offset} ) { |
821 | 823 | preg_match( "/(\\{?\"([^\"\\\\]|\\\\.)*\"|[^,{}]+)+([,}]+)/", |
— | — | @@ -823,10 +825,12 @@ |
824 | 826 | $output[] = ( '"' != $match[1]{0} |
825 | 827 | ? $match[1] |
826 | 828 | : stripcslashes( substr( $match[1], 1, -1 ) ) ); |
827 | | - if ( '},' == $match[3] ) |
| 829 | + if ( '},' == $match[3] ) { |
828 | 830 | return $output; |
829 | | - } else |
830 | | - $offset = $this->pg_array_parse( $text, $output[], $limit, $offset+1 ); |
| 831 | + } |
| 832 | + } else { |
| 833 | + $offset = $this->pg_array_parse( $text, $output, $limit, $offset+1 ); |
| 834 | + } |
831 | 835 | } while ( $limit > $offset ); |
832 | 836 | return $output; |
833 | 837 | } |