[wp-trac] [WordPress Trac] #7221: PHP notice "WP_CONTENT_DIR undefined" occurs when creating wp-config.php

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 2 05:15:10 GMT 2008


#7221: PHP notice "WP_CONTENT_DIR undefined" occurs when creating wp-config.php
---------------------+------------------------------------------------------
 Reporter:  lilyfan  |       Owner:  anonymous   
     Type:  defect   |      Status:  new         
 Priority:  high     |   Milestone:  2.6         
Component:  General  |     Version:  2.6         
 Severity:  normal   |    Keywords:  setup-config
---------------------+------------------------------------------------------
 The first step of installing: wordpress can create a wp-config.php  file
 with setup-config.php.
 In this step, WP_CONTENT_DIR is not defined. But wp-includes/functions.php
 does not cosider the situation.
 So, a PHP notice occures:
 Use of undefined constant WP_CONTENT_DIR - assumed 'WP_CONTENT_DIR' in
 /home/***/public_html/wp-includes/functions.php on line 1988

 To solve the problem: change line 1988 of wp-includes/fuctions.php below:
 `if (defined('WP_CONTENT_DIR') && file_exists( WP_CONTENT_DIR . '/db.php'
 ) )`

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7221>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list