$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 );
}
$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 );
}