We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running wp cli throws a lot of warning that wp-config.php's defines are already defined..
I added at the top of the wp-config.ini to check who loaded the config again.
if ( defined( 'WP_CLI' ) && WP_CLI ) { echo "Loading wp-config.php\n"; debug_print_backtrace(); }
in the function load_wordpress() it requires wp-load.php
$wp_load_path = XCLONER_PLUGIN_DIR . '/../../../wp-load.php'; if (!file_exists($wp_load_path)) { throw new Exception('Can\'t find WordPress load file (wp-load.php)'); } require_once($wp_load_path);
So I just added a check if wordpress is already loaded and I stoped having these warnings
/** * @throws Exception */ private function load_wordpress() { // Check if WordPress is already loaded if (defined('ABSPATH')) { return; } $wp_load_path = XCLONER_PLUGIN_DIR . '/../../../wp-load.php'; if (!file_exists($wp_load_path)) { throw new Exception('Can\'t find WordPress load file (wp-load.php)'); } require_once($wp_load_path); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Running wp cli throws a lot of warning that wp-config.php's defines are already defined..
I added at the top of the wp-config.ini to check who loaded the config again.
in the function load_wordpress() it requires wp-load.php
So I just added a check if wordpress is already loaded and I stoped having these warnings
The text was updated successfully, but these errors were encountered: