mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 14:58:42 +00:00
Fixing console web run
This commit is contained in:
parent
ed79ead137
commit
968d4823b5
|
|
@ -224,6 +224,8 @@ class Localization
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
|
* @throws InvalidEnumValue
|
||||||
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -155,7 +155,7 @@ class Http implements UriInterface
|
||||||
$this->port = $url['port'] ?? null;
|
$this->port = $url['port'] ?? null;
|
||||||
$this->user = $url['user'] ?? null;
|
$this->user = $url['user'] ?? null;
|
||||||
$this->pass = $url['pass'] ?? null;
|
$this->pass = $url['pass'] ?? null;
|
||||||
$this->path = $url['path'] ?? null;
|
$this->path = $url['path'] ?? '';
|
||||||
|
|
||||||
if (StringUtils::endsWith($this->path, '.php')) {
|
if (StringUtils::endsWith($this->path, '.php')) {
|
||||||
$this->path = substr($this->path, 0, -4);
|
$this->path = substr($this->path, 0, -4);
|
||||||
|
|
@ -183,7 +183,7 @@ class Http implements UriInterface
|
||||||
public static function getCurrent() : string
|
public static function getCurrent() : string
|
||||||
{
|
{
|
||||||
/** @noinspection PhpUndefinedConstantInspection */
|
/** @noinspection PhpUndefinedConstantInspection */
|
||||||
return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
return 'http://' . ($_SERVER['HTTP_HOST'] ?? '') . ($_SERVER['REQUEST_URI'] ?? '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user