Cast to bool in Database::update
authoraddshore <addshorewiki@gmail.com>
Tue, 21 Mar 2017 22:37:30 +0000 (22:37 +0000)
committeraddshore <addshorewiki@gmail.com>
Tue, 21 Mar 2017 22:37:30 +0000 (22:37 +0000)
The interface is documented as returning a bool, so stick to that
interface.

Bug: T160956
Change-Id: I725651e1d66fdd6c52ef82e93fd9e3c837edb022

includes/libs/rdbms/database/Database.php

index 90e60a3..92adaf9 100644 (file)
@@ -1542,7 +1542,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                        $sql .= " WHERE " . $this->makeList( $conds, self::LIST_AND );
                }
 
-               return $this->query( $sql, $fname );
+               return (bool)$this->query( $sql, $fname );
        }
 
        public function makeList( $a, $mode = self::LIST_COMMA ) {