[wp-trac] [WordPress Trac] #29694: wp_not_installed() has an unbounded check for "install.php"

WordPress Trac noreply at wordpress.org
Thu Sep 18 03:16:12 UTC 2014


#29694: wp_not_installed() has an unbounded check for "install.php"
--------------------------------------+------------------
 Reporter:  nacin                     |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  4.1
Component:  Bootstrap/Load            |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:
--------------------------------------+------------------
Changes (by joemcgill):

 * keywords:  good-first-bug => good-first-bug has-patch


Comment:

 tl;dr - I think it's safe to kill the check for install.php.

 '''A brief history lesson:'''

 * In version 3, nacin creates wp_not_installed() from logic moved out of
 wp-settings.php (changeset 12732:
 https://core.trac.wordpress.org/changeset/12732)
 * The check for strstr($_SERVER[ 'PHP_SELF']. 'install.php') dates back to
 v1.5, at which point there were no other *-install.php files in core.
 * Aside: Mark Jaquith commited changeset 4990
 (https://core.trac.wordpress.org/changeset/4990) in 2.2 which replace
 strstr() with strpos() for performance reasons, otherwise this has been
 mostly unchanged forever. (related:
 https://core.trac.wordpress.org/ticket/3920)
 * The oldest relevant changeset available in Trac
 (https://core.trac.wordpress.org/changeset/2486) shows that the check for
 install.php and WP_INSTALLING were originally paired as an OR instead of
 an AND, which would explain the redundancy.
 * Also, since define( 'WP_INSTALLING', true ); was added to install.php in
 1.5.1, I'm guessing the redundancy really began to come into play at that
 point.

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


More information about the wp-trac mailing list