From 4a158e621d1c340d84a9e43b466c1741fbbbb196 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 26 Jun 2016 10:05:20 +0000 Subject: [PATCH] Database: Explicitly globalize `$wpdb` in `wp-settings.php` in case WordPress isn't loaded in global scope. See [18993] for `$table_prefix`. Props danielbachhuber. Fixes #37123. git-svn-id: https://develop.svn.wordpress.org/trunk@37864 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-settings.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-settings.php b/src/wp-settings.php index ae7a1735ea..d8c818bf5e 100644 --- a/src/wp-settings.php +++ b/src/wp-settings.php @@ -99,6 +99,7 @@ require( ABSPATH . WPINC . '/class-wp-error.php' ); require( ABSPATH . WPINC . '/pomo/mo.php' ); // Include the wpdb class and, if present, a db.php database drop-in. +global $wpdb; require_wp_db(); // Set the database table prefix and the format specifiers for database table columns.