[wp-trac] [WordPress Trac] #53297: Bug in wpdb update
WordPress Trac
noreply at wordpress.org
Sat May 29 16:45:08 UTC 2021
#53297: Bug in wpdb update
--------------------------+-----------------------------
Reporter: ttodua | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
To test a simple example:
{{{
$wpdb->update('any_custom_table', ['parent'=>"hello world",
"other"=>"xyz"], $WhereArray );
}}}
Even though, in the table, the "parent" column is "text" type (non
numeric), wordpress still converts the value and instead of "hello world"
the numeric value is being inserted (i.e. 0 in that case, however, if you
pass "123456_hello", it inserts 123456.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53297>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list