From 277ea8a8d43231da2340bd9c0cb13d80c7b90012 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 29 May 2007 20:28:59 +0000 Subject: [PATCH] The variable mLastResult may be null /or/ false: check for both in affected rows method. --- includes/DatabasePostgres.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index 8a40e66acc..b5721db2b2 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -561,7 +561,7 @@ class DatabasePostgres extends Database { } function affectedRows() { - if( !isset( $this->mLastResult ) ) + if( !isset( $this->mLastResult ) or ! $this->mLastResult ) return 0; return pg_affected_rows( $this->mLastResult ); -- 2.20.1