[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
Mon Oct 2 02:44:50 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:  pento
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:  4.9
Component:  Database                  |     Version:  4.8.2
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------

Comment (by pento):

 In [changeset:"41663"]:
 {{{
 #!CommitTicketReference repository="" revision="41663"
 Database: Fix some PHP errors introduced in [41662].

 PHP < 5.4 requires a `$matches` parameter to be passed to
 `preg_match_all()`

 `wpdb::prepare()` can be called before translations are loaded, so needs
 appropriate `wp_load_translations_early()` calls.

 See #42040.
 }}}

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


More information about the wp-trac mailing list