r113501 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113500‎ | r113501 | r113502 >
Date:19:05, 9 March 2012
Author:reedy
Status:ok
Tags:
Comment:
Fix syntax error and indenting from r113487
Modified paths:
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -814,7 +814,9 @@
815815 $limit = strlen( $text )-1;
816816 $output = array();
817817 }
818 - if( '{}' != $text )
 818+ if( '{}' == $text ) {
 819+ return $output;
 820+ }
819821 do {
820822 if ( '{' != $text{$offset} ) {
821823 preg_match( "/(\\{?\"([^\"\\\\]|\\\\.)*\"|[^,{}]+)+([,}]+)/",
@@ -823,10 +825,12 @@
824826 $output[] = ( '"' != $match[1]{0}
825827 ? $match[1]
826828 : stripcslashes( substr( $match[1], 1, -1 ) ) );
827 - if ( '},' == $match[3] )
 829+ if ( '},' == $match[3] ) {
828830 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+ }
831835 } while ( $limit > $offset );
832836 return $output;
833837 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113487Handle PostgreSQL transaction errors and improve schema detection...saper17:24, 9 March 2012

Status & tagging log