[wp-trac] [WordPress Trac] #59450: Initialize $url variable later in get_bloginfo()
WordPress Trac
noreply at wordpress.org
Thu Dec 7 22:55:44 UTC 2023
#59450: Initialize $url variable later in get_bloginfo()
------------------------------+--------------------------
Reporter: Cybr | Owner: flixos90
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.5
Component: General | Version: 2.3
Severity: minor | Resolution: fixed
Keywords: has-patch commit | Focuses: performance
------------------------------+--------------------------
Changes (by flixos90):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"57170" 57170]:
{{{
#!CommitTicketReference repository="" revision="57170"
General: Avoid early initialization of variable in `get_bloginfo()`.
This is a very minor, yet simple performance optimization in a commonly
called function, avoiding unnecessary initialization of the `$url`
variable when it may not be needed. The conditional is simple enough to
not use a variable altogether.
Props Cybr, swissspidy.
Fixes #59450.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59450#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list