[wp-trac] [WordPress Trac] #35560: Use of undefined constant DB_USER - assumed 'DB_USER'

WordPress Trac noreply at wordpress.org
Sun Feb 11 18:33:00 UTC 2018


#35560: Use of undefined constant DB_USER - assumed 'DB_USER'
--------------------------+-----------------------
 Reporter:  mariusvw      |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  5.0
Component:  Database      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch => has-patch


Comment:

 [attachment:35560.diff] doesn't work as expected in my testing:
 1. By the time `setup-config.php` checks the connection, `require_wp_db()`
 is already run via `wp-settings.php`.
 2. If the values are already defined on first run, this prevents `setup-
 config.php` from [https://core.trac.wordpress.org/browser/tags/4.9.4/src
 /wp-admin/setup-config.php?marks=264-276#L264 redefining them] to test the
 connection with user-supplied values.

 [attachment:35560.2.diff] is an alternative approach.

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


More information about the wp-trac mailing list