[wp-trac] [WordPress Trac] #34482: wp-db.php incorrect usage of strip_invalid_text() in process_fields()
WordPress Trac
noreply at wordpress.org
Fri Jan 8 11:04:16 UTC 2016
#34482: wp-db.php incorrect usage of strip_invalid_text() in process_fields()
-------------------------------+----------------------
Reporter: fhwebcs | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Database | Version: 4.2
Severity: normal | Resolution: invalid
Keywords: reporter-feedback | Focuses:
-------------------------------+----------------------
Comment (by TiagoGouvea):
Ok.. more detailed information about problem here:
I'm trying to update a record, setting a field to null (but it already
null), and the $converted_data are stripping the 'NULL' to 2 characters
because the field are a char(2)... and then, it result in false due the
$data is different of the $converted_data.
Here the dumps:
{{{#!php
// $data
array (size=1)
'end_estado' =>
array (size=4)
'value' => string 'NULL' (length=4)
'format' => string '%s' (length=2)
'charset' => string 'latin1' (length=6)
'length' =>
array (size=2)
'type' => string 'char' (length=4)
'length' => int 2
// $converted_data
array (size=1)
'end_estado' =>
array (size=4)
'value' => string 'NU' (length=2)
'format' => string '%s' (length=2)
'charset' => string 'latin1' (length=6)
'length' =>
array (size=2)
'type' => string 'char' (length=4)
'length' => int 2
}}}
What you think?
Thanks
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34482#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list