[wp-trac] [WordPress Trac] #59448: is_wp_version_compatible works unreliably

WordPress Trac noreply at wordpress.org
Wed Nov 15 17:26:10 UTC 2023


#59448: is_wp_version_compatible works unreliably
-------------------------------------------------+-------------------------
 Reporter:  kkmuffme                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Upgrade/Install                      |     Version:  5.2
 Severity:  minor                                |  Resolution:
 Keywords:  needs-patch good-first-bug 2nd-      |     Focuses:
  opinion                                        |
-------------------------------------------------+-------------------------
Changes (by jorbin):

 * keywords:  needs-patch good-first-bug => needs-patch good-first-bug 2nd-
     opinion


Comment:

 Thanks @sessioncookiemonster for the patch. A few notes:
 - Please make sure to use the WordPress coding standards. PHPCS should be
 able to help with this.
 - The string needs to be translatable. I also think it might be good to
 make this error as descriptive as possible, maybe something like `Invalid
 Version string passed to is_wp_version_compatible. $version passed but
 $valid_request assumed.`

 Also, @costdev pointed out in slack that `wp_trigger_error` might be
 better to use. I'm not sure yet but would love to hear some other folks
 chime in.

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


More information about the wp-trac mailing list