Skip to content

Commit

Permalink
check if cli
Browse files Browse the repository at this point in the history
  • Loading branch information
alikon committed Oct 2, 2021
1 parent 0ca4d39 commit 8d122d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libraries/src/Uri/Uri.php
Expand Up @@ -100,6 +100,11 @@ public static function getInstance($uri = 'SERVER')
*
* IIS uses the SCRIPT_NAME variable instead of a REQUEST_URI variable... thanks, MS
*/
if (Factory::getApplication()->isClient('cli'))
{
$_SERVER['HTTP_HOST'] = 'localhost';
}

$theURI = 'http' . $https . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'];

// If the query string exists append it to the URI string
Expand Down

0 comments on commit 8d122d6

Please sign in to comment.