[wp-trac] [WordPress Trac] #59450: Fix get_bloginfo

WordPress Trac noreply at wordpress.org
Tue Sep 26 12:06:35 UTC 2023


#59450: Fix get_bloginfo
--------------------------+--------------------------
 Reporter:  Cybr          |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.5
Component:  General       |     Version:  2.3
 Severity:  minor         |  Resolution:
 Keywords:  has-patch     |     Focuses:  performance
--------------------------+--------------------------
Changes (by swissspidy):

 * severity:  normal => minor
 * milestone:  Awaiting Review => 6.5


Comment:

 Initializing the variable only when it's needed is reasonable.

 I doubt the performance impact is that high though in a real world
 scenario, as the function is never used 100k times on a single page load
 :)
 In fact, your benchmark shows that `preg_match` is ''slower'' even with
 1e4 iterations.

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


More information about the wp-trac mailing list