Fixing console web run

This commit is contained in:
Dennis Eichhorn 2016-11-07 21:45:35 +01:00
parent ed79ead137
commit 968d4823b5
2 changed files with 4 additions and 2 deletions

View File

@ -224,6 +224,8 @@ class Localization
*
* @return void
*
* @throws InvalidEnumValue
*
* @since 1.0.0
* @author Dennis Eichhorn <d.eichhorn@oms.com>
*/

View File

@ -155,7 +155,7 @@ class Http implements UriInterface
$this->port = $url['port'] ?? null;
$this->user = $url['user'] ?? null;
$this->pass = $url['pass'] ?? null;
$this->path = $url['path'] ?? null;
$this->path = $url['path'] ?? '';
if (StringUtils::endsWith($this->path, '.php')) {
$this->path = substr($this->path, 0, -4);
@ -183,7 +183,7 @@ class Http implements UriInterface
public static function getCurrent() : string
{
/** @noinspection PhpUndefinedConstantInspection */
return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
return 'http://' . ($_SERVER['HTTP_HOST'] ?? '') . ($_SERVER['REQUEST_URI'] ?? '');
}
/**