Skip to content
This repository was archived by the owner on Feb 26, 2019. It is now read-only.

Commit 3f61891

Browse files
committed
And condition to see if HTTP_HOST is set for cron or WP-CLI
1 parent 673cd75 commit 3f61891

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ngrok-local.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Ngrok_Local {
1616
public function __construct(){
1717
$this->site_url = site_url() . '/';;
1818

19-
if ( ! defined( 'WP_SITEURL' ) && ! defined( 'WP_HOME' ) ) {
19+
if ( ! defined( 'WP_SITEURL' ) && ! defined( 'WP_HOME' ) && isset( $_SERVER['HTTP_HOST'] ) ) {
2020
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
2121
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
2222
} else {

0 commit comments

Comments
 (0)