#28598 closed defect (bug) (invalid)
wp-db.php does not appear to have access to wp-config.php settings
Reported by: | lord_boffo | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9.1 |
Component: | Bootstrap/Load | Keywords: | |
Focuses: | Cc: |
Description
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.
Change History (3)
#1
@
11 years ago
- Component changed from General to Bootstrap/Load
- Keywords close reporter-feedback added
Note: See
TracTickets for help on using
tickets.
Thanks for the report lord_boffo, but I'm unable to reproduce the problem.
Are you sure you've defined the
CUSTOM_USER_TABLE
andCUSTOM_USER_META_TABLE
constants in yourwp-config.php
file? They are definitely available towp-db.php
once they're defined and there's no reason they wouldn't be, unless they've been added to the bottom of the file below the line that says/* That's all, stop editing! Happy blogging. */
.