From 4d21db9f0b426f6c036ecca081ed8970cb9859c6 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 25 Aug 2011 17:47:33 +0000 Subject: [PATCH] Followup r95449, fix the code to do what it was actually intended to do --- includes/db/Database.php | 2 +- includes/db/DatabaseOracle.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index fd1415389b..6126b3559b 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1693,7 +1693,7 @@ abstract class DatabaseBase implements DatabaseType { $opts = $this->makeUpdateOptions( $options ); $sql = "UPDATE $opts $table SET " . $this->makeList( $values, LIST_SET ); - if ( $conds != '*' || ( is_array( $conds ) && count( $conds ) ) ) { + if ( $conds !== array() && $conds !== '*' ) { $sql .= " WHERE " . $this->makeList( $conds, LIST_AND ); } diff --git a/includes/db/DatabaseOracle.php b/includes/db/DatabaseOracle.php index 23e449ac7f..8ede6bcaf8 100644 --- a/includes/db/DatabaseOracle.php +++ b/includes/db/DatabaseOracle.php @@ -1194,7 +1194,8 @@ class DatabaseOracle extends DatabaseBase { $sql .= $sqlSet; } - if ( $conds != '*' || ( is_array( $conds ) && count( $conds ) ) ) { + if ( $conds !== array() && $conds !== '*' ) { + if ( $conds !== array() && $conds !== '*' ) { $conds = $this->wrapConditionsForWhere( $table, $conds ); $sql .= ' WHERE ' . $this->makeList( $conds, LIST_AND ); } -- 2.20.1