Merge "Declare visibility for class properties in DatabasePostgres.php"
[lhc/web/wiklou.git] / includes / db / DatabasePostgres.php
index a5a7a19..21a7bcf 100644 (file)
@@ -786,11 +786,8 @@ __INDEXATTR__;
                if ( !$res ) {
                        return null;
                }
-               foreach ( $res as $row ) {
-                       return true;
-               }
 
-               return false;
+               return $res->numRows() > 0;
        }
 
        /**
@@ -901,7 +898,7 @@ __INDEXATTR__;
                        }
                }
                if ( $savepoint ) {
-                       $olde = error_reporting( $olde );
+                       error_reporting( $olde );
                        $savepoint->commit();
 
                        // Set the affected row count for the whole operation
@@ -973,7 +970,7 @@ __INDEXATTR__;
                                $savepoint->release();
                                $numrowsinserted++;
                        }
-                       $olde = error_reporting( $olde );
+                       error_reporting( $olde );
                        $savepoint->commit();
 
                        // Set the affected row count for the whole operation