From: Sam Reed Date: Thu, 25 Aug 2011 17:47:33 +0000 (+0000) Subject: Followup r95449, fix the code to do what it was actually intended to do X-Git-Tag: 1.31.0-rc.0~28065 X-Git-Url: http://git.cyclocoop.org/%22%20%20.%20generer_url_ecrire%28%22mots_tous%22%29%20.%20%22?a=commitdiff_plain;h=4d21db9f0b426f6c036ecca081ed8970cb9859c6;p=lhc%2Fweb%2Fwiklou.git Followup r95449, fix the code to do what it was actually intended to do --- 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 ); }