[wp-trac] [WordPress Trac] #15158: wpdb insert & update with null values
WordPress Trac
noreply at wordpress.org
Fri Dec 28 19:23:01 UTC 2012
#15158: wpdb insert & update with null values
-------------------------+-----------------------------
Reporter: westi | Owner: sorich87
Type: enhancement | Status: accepted
Priority: normal | Milestone: Future Release
Component: Database | Version: 3.0.1
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+-----------------------------
Comment (by miqrogroove):
Here are a couple of test cases to break your patch. If you can get the
bugs worked out, I'll take another look at it. :)
Patch breaks the last arg:
{{{
prepare( 'INSERT INTO foo ( val1, val2, val3, val4, val5 ) VALUES
("\'%%s\' is where strings go",%s,%d,%s,%s) ', 'My First WP post', '1010',
NULL, 'Hello, World!' );
}}}
Patch returns bool(false) and throws a PHP Warning:
{{{
prepare( 'INSERT INTO foo ( val1, val2, val3, val4, val5 ) VALUES
("\'%%s\' is where strings go",%s,%s,%d,%s) ', NULL, 'My First WP post',
'1010', 'Hello, World!' );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15158#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list