[wp-trac] [WordPress Trac] #61782: Memoize wp_get_wp_version

WordPress Trac noreply at wordpress.org
Fri Oct 4 20:14:30 UTC 2024


#61782: Memoize wp_get_wp_version
------------------------------------------+-----------------------------
 Reporter:  Cybr                          |       Owner:  SergeyBiryukov
     Type:  defect (bug)                  |      Status:  reopened
 Priority:  normal                        |   Milestone:
Component:  General                       |     Version:  trunk
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch dev-feedback close  |     Focuses:
------------------------------------------+-----------------------------

Comment (by azaozz):

 Replying to [comment:17 peterwilsoncc]:
 > @azaozz The upgrade routine returns the new version but I am not sure if
 it assigned to the global on the current request or not. If not, then you
 are correct that caching the value would match the current behaviour.

 Yea, seems the two calls to `wp_get_wp_version()` that are in `update-
 core.php` would need to be removed as that file cannot contain functions
 that don't exist in the (old) version that is being updated, #62165. That
 seems to be the only place that may be "sensitive" about old vs. new
 version, and seems it's best handled by including the appropriate
 version.php file.

 Not really sure if anything else might be affected, neems quite unlikely.
 Nevertheless seems that maintaining the old behavior would be preferable
 just in case.

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


More information about the wp-trac mailing list