https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113501
Revision: 113501 Author: reedy Date: 2012-03-09 19:05:29 +0000 (Fri, 09 Mar 2012) Log Message: ----------- Fix syntax error and indenting from r113487 Modified Paths: -------------- trunk/phase3/includes/db/DatabasePostgres.php Modified: trunk/phase3/includes/db/DatabasePostgres.php =================================================================== --- trunk/phase3/includes/db/DatabasePostgres.php 2012-03-09 19:01:30 UTC (rev 113500) +++ trunk/phase3/includes/db/DatabasePostgres.php 2012-03-09 19:05:29 UTC (rev 113501) @@ -814,7 +814,9 @@ $limit = strlen( $text )-1; $output = array(); } - if( '{}' != $text ) + if( '{}' == $text ) { + return $output; + } do { if ( '{' != $text{$offset} ) { preg_match( "/(\\{?\"([^\"\\\\]|\\\\.)*\"|[^,{}]+)+([,}]+)/", @@ -823,10 +825,12 @@ $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; } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs