PHP Notice: Undefined index: HTTP_HOST in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1197) : eval()'d code on line 34 code example
Example: Undefined index: HTTP_HOST
/* When a request is done with an empty host:
GET / HTTP/1.1
Host:
Then isset($_SERVER['HTTP_HOST']) is true!
It is better to use empty like:*/
$host = '';
if (!empty($_SERVER['HTTP_HOST'])) {
$host = $_SERVER['HTTP_HOST'];
}