Skip to content

Commit

Permalink
Merge pull request #3711 from wp-cli/3710-error-notice
Browse files Browse the repository at this point in the history
Prevent error notice from `wp_guess_url()` when core isn't installed
  • Loading branch information
danielbachhuber committed Jan 5, 2017
2 parents dc19148 + 4930b95 commit 6a5211c
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 6a5211c

Please sign in to comment.