fix: совместимость с php8.2
This commit is contained in:
parent
3a2b273adc
commit
0d6da39e90
3 changed files with 6 additions and 5 deletions
|
|
@ -185,7 +185,7 @@ class Login extends Filter
|
|||
}
|
||||
} else if (isset($_SERVER['HTTP_REFERER'])) {
|
||||
$arr = array();
|
||||
parse_str(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY), $arr);
|
||||
parse_str(parse_url($_SERVER['HTTP_REFERER'], PHP_URL_QUERY) ?? '', $arr);
|
||||
if (isset($arr['back_page']) && $request->get('mode') != 'ajax') {
|
||||
$request->redirect($arr['back_page']);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ class Factory
|
|||
{
|
||||
public $db;
|
||||
public $config;
|
||||
public $user;
|
||||
|
||||
public function __construct (Database $db, Registry $config = null, User $user = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,12 +19,12 @@ class Path
|
|||
public function __construct($path = '')
|
||||
{
|
||||
//assert(is_string($path));
|
||||
$this->url = parse_url($path);
|
||||
$this->url = parse_url($path ?? '');
|
||||
|
||||
if (isset($this->url['path'])) {
|
||||
$path = $this->url['path'];
|
||||
// $path = preg_replace('/\/{2,}/', '/', $path);
|
||||
$list = self::listFromString($path);
|
||||
$list = $this->listFromString($path);
|
||||
|
||||
if (isset($this->url['scheme']) && !isset($this->url['host'])) {
|
||||
$this->absolute = false;
|
||||
|
|
@ -32,7 +32,7 @@ class Path
|
|||
$this->absolute = true;
|
||||
}
|
||||
|
||||
$this->path = self::optimize($list);
|
||||
$this->path = $this->optimize($list);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -311,7 +311,7 @@ class Path
|
|||
static function join($_rest)
|
||||
{
|
||||
$args = func_get_args();
|
||||
$path = call_user_func_array("self::fromJoin", $args);
|
||||
$path = call_user_func_array([self::class, "fromJoin"], $args);
|
||||
return self::makeUrl($path->url);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue