[wp-trac] [WordPress Trac] #34703: wp_db->strip_invalid_text problem with NULL varchar(2) fields
WordPress Trac
noreply at wordpress.org
Mon Nov 16 18:36:55 UTC 2015
#34703: wp_db->strip_invalid_text problem with NULL varchar(2) fields
--------------------------+-----------------------------
Reporter: TiagoGouvea | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 4.2.4
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When I tried to save a record the udpdate fails and looking for the
problem I found a possible error in wp_db.
In block :
"$converted_data = $this->strip_invalid_text( $data );
if ( $data !== $converted_data ) {"
If always return false to me, looking closer on strip_invalid_text method,
I saw that a field seen to be different in that arrays. The field have
null value but, it show value in the $data array as 'NU', because the
field are a varchar(2), and then, it consider $data!=$converted_data, when
it's not.
* I'm updating another field, but the query include the null field on the
update again. I'm not changig that field value.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34703>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list