VENOM: FIX PHP8!
This commit is contained in:
parent
5c44d50989
commit
3d92f5347a
1 changed files with 4 additions and 1 deletions
|
@ -106,10 +106,13 @@ class Router
|
||||||
|
|
||||||
public function tryFunctionCall(?array $aRoute): bool
|
public function tryFunctionCall(?array $aRoute): bool
|
||||||
{
|
{
|
||||||
if ($aRoute === null || !is_callable(array($aRoute['cl'], $aRoute['fnc']))) {
|
if ($aRoute === null || empty($aRoute['cl']) || empty($aRoute['fnc']) || !class_exists($aRoute['cl'])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$route = new $aRoute['cl']();
|
$route = new $aRoute['cl']();
|
||||||
|
if (!is_callable(array($route, $aRoute['fnc']))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
$fnc = $aRoute['fnc'];
|
$fnc = $aRoute['fnc'];
|
||||||
$params = $aRoute['params'] ?? [];
|
$params = $aRoute['params'] ?? [];
|
||||||
|
|
Loading…
Reference in a new issue