WP-CLI error: Undefined array key “HTTP_HOST”
-
PHP Warning: Undefined array key "HTTP_HOST" in /chroot/home/.../wp-content/plugins/wp-datepicker/index.php on line 28
I fixed this by doing this:
$HTTP_HOST = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (string)parse_url(get_option('siteurl'), PHP_URL_HOST); $wpdp_actual_link = $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$HTTP_HOST$_SERVER[REQUEST_URI]";
Maybe this could be added in the next release? Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘WP-CLI error: Undefined array key “HTTP_HOST”’ is closed to new replies.