[wp-trac] [WordPress Trac] #28598: wp-db.php does not appear to have access to wp-config.php settings

WordPress Trac noreply at wordpress.org
Fri Jun 20 04:11:00 UTC 2014


#28598: wp-db.php does not appear to have access to wp-config.php settings
--------------------------+-----------------------------
 Reporter:  lord_boffo    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.9.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 wp-db.php does not appear to have access to wp-config.php settings.

 At line 949 in wp-db.php
 {{{
 if ( isset( $tables['users'] ) && defined( 'CUSTOM_USER_TABLE' ) )
     $tables['users'] = CUSTOM_USER_TABLE;
 if ( isset( $tables['usermeta'] ) && defined('CUSTOM_USER_META_TABLE' )
     $tables['usermeta'] = CUSTOM_USER_META_TABLE;
 }}}


 If I change the if statments to only use the isset(), then the values are
 set to the strings "CUSTOM_USER_TABLE" and "CUSTOM_USER_META_TABLE", not
 the values of those constants.

 If I change the if statments to only use the isset(), and hardcode the
 values instead of using the constants, the hardcoded values are used.


 If it is decided not to fix this, then http://codex.wordpress.org
 /Editing_wp-config.php#Custom_User_and_Usermeta_Tables needs to be changed
 as the instructions for custom user tables do not work when wp-db.php
 cannot see the constants that have been defined.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28598>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list