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
|
||||
{
|
||||
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;
|
||||
}
|
||||
$route = new $aRoute['cl']();
|
||||
if (!is_callable(array($route, $aRoute['fnc']))) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
$fnc = $aRoute['fnc'];
|
||||
$params = $aRoute['params'] ?? [];
|
||||
|
|
Loading…
Reference in a new issue