Skip to content
New issue

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

Prevent error notice from wp_guess_url() when core isn't installed #3711

Merged
merged 1 commit into from Jan 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions php/WP_CLI/Runner.php
Expand Up @@ -990,6 +990,12 @@ public function load_wordpress() {
$this->maybe_update_url_from_domain_constant();
WP_CLI::do_hook( 'after_wp_config_load' );

// Prevent error notice from wp_guess_url() when core isn't installed
if ( $this->cmd_starts_with( array( 'core', 'is-installed' ) )
&& ! defined( 'COOKIEHASH' ) ) {
define( 'COOKIEHASH', md5( 'wp-cli' ) );
}

// Load WP-CLI utilities
require WP_CLI_ROOT . '/php/utils-wp.php';

Expand Down