mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
DB: Revert [28814] and require a WHERE for wpdb::update().
see #26106. git-svn-id: https://develop.svn.wordpress.org/trunk@29664 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1793,9 +1793,7 @@ class wpdb {
|
||||
$wheres[] = "`$field` = {$form}";
|
||||
}
|
||||
|
||||
$wheres = empty( $where ) ? '' : ( ' WHERE ' . implode( ' AND ', $wheres ) );
|
||||
|
||||
$sql = "UPDATE `$table` SET " . implode( ', ', $bits ) . $wheres;
|
||||
$sql = "UPDATE `$table` SET " . implode( ', ', $bits ) . ' WHERE ' . implode( ' AND ', $wheres );
|
||||
return $this->query( $this->prepare( $sql, array_merge( array_values( $data ), array_values( $where ) ) ) );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user