Merge "Converted Interwiki using WAN cache"
[lhc/web/wiklou.git] / includes / db / DatabasePostgres.php
index 0487b79..9287f7a 100644 (file)
@@ -530,10 +530,12 @@ class DatabasePostgres extends DatabaseBase {
                                return;
                        }
                }
-               /* Transaction stays in the ERROR state until rolledback */
+               /* Transaction stays in the ERROR state until rolled back */
                if ( $this->mTrxLevel ) {
+                       $ignore = $this->ignoreErrors( true );
                        $this->rollback( __METHOD__ );
-               };
+                       $this->ignoreErrors( $ignore );
+               }
                parent::reportQueryError( $error, $errno, $sql, $fname, false );
        }
 
@@ -712,7 +714,7 @@ class DatabasePostgres extends DatabaseBase {
                        $row = $this->fetchRow( $res );
                        $count = array();
                        if ( preg_match( '/rows=(\d+)/', $row[0], $count ) ) {
-                               $rows = $count[1];
+                               $rows = (int)$count[1];
                        }
                }