The variable mLastResult may be null /or/ false: check for both in affected rows...
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 29 May 2007 20:28:59 +0000 (20:28 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 29 May 2007 20:28:59 +0000 (20:28 +0000)
includes/DatabasePostgres.php

index 8a40e66..b5721db 100644 (file)
@@ -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 );