[wp-trac] [WordPress Trac] #54877: Occasional PHP exception being thrown on WPDB/MySQLi connections
WordPress Trac
noreply at wordpress.org
Thu Jan 27 21:30:21 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 azouamauriac):
ok it's ok for me. by the way I've found one usage of it in src/wp-
includes/SimplePie/Enclosure.php. thank you.
Replying to [comment:10 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:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list