[wp-trac] [WordPress Trac] #54877: Occasional PHP exception being thrown on WPDB/MySQLi connections

WordPress Trac noreply at wordpress.org
Thu Jan 27 20:41:07 UTC 2022


#54877: Occasional PHP exception being thrown on WPDB/MySQLi connections
-----------------------------------+---------------------
 Reporter:  johnjamesjacoby        |       Owner:  (none)
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  6.0
Component:  Database               |     Version:  1.5
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:
-----------------------------------+---------------------

Comment (by SergeyBiryukov):

 Replying to [comment:8 azouamauriac]:
 > May be we can replace this foreach by
 > {{{#!php
 > <?php
 > extract($matches);
 > }}}

 I believe we'd want to avoid the `extract()` usage, as most instances were
 eliminated from core in #22400, except for one instance in
 `load_template()` that was left for backward compatibility. The
 `extract()` usage is also [https://make.wordpress.org/core/handbook/best-
 practices/coding-standards/php/#dont-extract discouraged per the coding
 standards].

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


More information about the wp-trac mailing list