jenkins-bot has submitted this change and it was merged.

Change subject: Remove unused local variables
......................................................................


Remove unused local variables

Change-Id: I9e5667d3b27c7685004e2f3215ea51176988d3b2
---
M includes/db/DatabasePostgres.php
1 file changed, 3 insertions(+), 6 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php
index cfa2074..7410e49 100644
--- a/includes/db/DatabasePostgres.php
+++ b/includes/db/DatabasePostgres.php
@@ -765,11 +765,8 @@
                if ( !$res ) {
                        return null;
                }
-               foreach ( $res as $row ) {
-                       return true;
-               }
 
-               return false;
+               return $res->numRows() > 0;
        }
 
        /**
@@ -880,7 +877,7 @@
                        }
                }
                if ( $savepoint ) {
-                       $olde = error_reporting( $olde );
+                       error_reporting( $olde );
                        $savepoint->commit();
 
                        // Set the affected row count for the whole operation
@@ -952,7 +949,7 @@
                                $savepoint->release();
                                $numrowsinserted++;
                        }
-                       $olde = error_reporting( $olde );
+                       error_reporting( $olde );
                        $savepoint->commit();
 
                        // Set the affected row count for the whole operation

-- 
To view, visit https://gerrit.wikimedia.org/r/103882
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e5667d3b27c7685004e2f3215ea51176988d3b2
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Aude <aude.w...@gmail.com>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: PleaseStand <pleasest...@live.com>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to