From d47145d894abe716087179cc6dc332e26359df39 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Fri, 27 Dec 2013 01:52:09 +0100 Subject: [PATCH] Remove unused local variables Change-Id: I9e5667d3b27c7685004e2f3215ea51176988d3b2 --- includes/db/DatabasePostgres.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/includes/db/DatabasePostgres.php b/includes/db/DatabasePostgres.php index cfa2074b78..7410e49a79 100644 --- a/includes/db/DatabasePostgres.php +++ b/includes/db/DatabasePostgres.php @@ -765,11 +765,8 @@ __INDEXATTR__; if ( !$res ) { return null; } - foreach ( $res as $row ) { - return true; - } - return false; + return $res->numRows() > 0; } /** @@ -880,7 +877,7 @@ __INDEXATTR__; } } if ( $savepoint ) { - $olde = error_reporting( $olde ); + error_reporting( $olde ); $savepoint->commit(); // Set the affected row count for the whole operation @@ -952,7 +949,7 @@ __INDEXATTR__; $savepoint->release(); $numrowsinserted++; } - $olde = error_reporting( $olde ); + error_reporting( $olde ); $savepoint->commit(); // Set the affected row count for the whole operation -- 2.20.1