From: Sam Reed Date: Fri, 9 Mar 2012 19:05:29 +0000 (+0000) Subject: Fix syntax error and indenting from r113487 X-Git-Tag: 1.31.0-rc.0~24316 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=eee30c7fd05b6cd4d1dbe8a98056cf71681e05af;p=lhc%2Fweb%2Fwiklou.git Fix syntax error and indenting from r113487 --- diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index c38d3a688c..7dcbc5fb48 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -814,7 +814,9 @@ class DatabasePostgres extends DatabaseBase { $limit = strlen( $text )-1; $output = array(); } - if( '{}' != $text ) + if( '{}' == $text ) { + return $output; + } do { if ( '{' != $text{$offset} ) { preg_match( "/(\\{?\"([^\"\\\\]|\\\\.)*\"|[^,{}]+)+([,}]+)/", @@ -823,10 +825,12 @@ class DatabasePostgres extends DatabaseBase { $output[] = ( '"' != $match[1]{0} ? $match[1] : stripcslashes( substr( $match[1], 1, -1 ) ) ); - if ( '},' == $match[3] ) + if ( '},' == $match[3] ) { return $output; - } else - $offset = $this->pg_array_parse( $text, $output[], $limit, $offset+1 ); + } + } else { + $offset = $this->pg_array_parse( $text, $output, $limit, $offset+1 ); + } } while ( $limit > $offset ); return $output; }