[wp-trac] [WordPress Trac] #32444: Scrutinizer in 4.3

WordPress Trac noreply at wordpress.org
Thu May 28 15:28:13 UTC 2015


#32444: Scrutinizer in 4.3
----------------------------+-----------------------------
 Reporter:  wonderboymusic  |       Owner:  wonderboymusic
     Type:  defect (bug)    |      Status:  assigned
 Priority:  normal          |   Milestone:  4.3
Component:  General         |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+-----------------------------

Comment (by wonderboymusic):

 In [changeset:"32635"]:
 {{{
 #!CommitTicketReference repository="" revision="32635"
 Add missing doc blocks to `update.php`:
 * `wp_version_check()`, `wp_update_plugins()`, and `wp_update_themes()` do
 not return meaningful responses, and their responses are never handled by
 core. As such, they shouldn't alternately return `void` or `false`.
 "Returning" in those functions is just "bailing"
 * In the same functions, `version.php` doesn't need to load if
 `WP_INSTALLING` is defined - the function will immediately bail, the
 values will never be read, and the globals won't be reset. I have unified
 the approach in all 3 functions.
 * When returning filtered `$locale`, there is no need to set the variable
 twice.
 * In `_maybe_update_core()`, `isset()` can take multiple values to bail
 before the call to `time()`, if necessary. This is a micro-optimization to
 prevent PHP from hitting the OS unnecessarily.

 See #32444.
 }}}

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


More information about the wp-trac mailing list