[wp-trac] [WordPress Trac] #53298: Checking if wp-config-sample.php file exists before checking if wp-config.php exists

WordPress Trac noreply at wordpress.org
Sat May 29 21:48:43 UTC 2021


#53298: Checking if wp-config-sample.php file exists before checking if wp-
config.php exists
-------------------------+-------------------------------------------------
 Reporter:               |       Owner:  (none)
  machineitsvcs          |
     Type:  defect       |      Status:  new
  (bug)                  |
 Priority:  normal       |   Milestone:  Awaiting Review
Component:               |     Version:  5.7.2
  Upgrade/Install        |
 Severity:  trivial      |  Resolution:
 Keywords:  needs-patch  |     Focuses:  administration, privacy, coding-
                         |  standards
-------------------------+-------------------------------------------------

Comment (by machineitsvcs):

 It may also be worth adding `@` to the elseif condition file_exists(
 dirname( ABSPATH ) . '/wp-config-sample.php' ) to avoid any error should
 both the wp-config.php and wp-config-sample.php not exist, similar to what
 is already done for the wp-config.php when looking in parent directory.

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


More information about the wp-trac mailing list