[wp-trac] [WordPress Trac] #42040: `$wpdb->prepare` returns blank without notice if less number of arguments are passed. should give a notice or exception

WordPress Trac noreply at wordpress.org
Sat Sep 30 13:01:47 UTC 2017


#42040: `$wpdb->prepare` returns blank without notice if less number of arguments
are passed. should give a notice or exception
----------------------------------------+------------------------------
 Reporter:  thekt12                     |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Database                    |     Version:  4.8.2
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------

Comment (by thekt12):

 I am not able to figure out how to write a unit test if a notices ic
 called or not :/
 I have added some test cases to the core prepare statement and where I am
 testing the return values but how to test if the notices function is
 called or not?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42040#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list