Skip to content

Commit 61ae275

Browse files
SergeyBiryukovSergeyBiryukov
authored andcommitted
Bootstrap/Load: Only override the $table_prefix global if not already defined.
This aims to provide more flexibility in preloading some environment settings before initializing WordPress. Follow-up to [18993], [57748]. Props ninos-ego, dd32, swissspidy, SergeyBiryukov. Fixes #63627. git-svn-id: https://develop.svn.wordpress.org/trunk@61250 602fd350-edb4-49c9-b593-d223f7449a82
1 parent eda4b00 commit 61ae275

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/wp-settings.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@
140140
*
141141
* @global string $table_prefix The database table prefix.
142142
*/
143-
$GLOBALS['table_prefix'] = $table_prefix;
143+
if ( ! isset( $GLOBALS['table_prefix'] ) ) {
144+
$GLOBALS['table_prefix'] = $table_prefix;
145+
}
144146

145147
// Set the database table prefix and the format specifiers for database table columns.
146148
wp_set_wpdb_vars();

0 commit comments

Comments
 (0)