Skip to content

Commit 4820ada

Browse files
committed
PHP 8.0 > Class name must be a valid object or a string in case the controller does not exist.
1 parent 7ad07e0 commit 4820ada

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/controller/sfController.class.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ protected function getController($moduleName, $controllerName, $extension)
299299
$classSuffix = ucfirst(strtolower($extension));
300300
if (!isset($this->controllerClasses[$moduleName.'_'.$controllerName.'_'.$classSuffix]))
301301
{
302-
$this->controllerExists($moduleName, $controllerName, $extension, true);
302+
if (!$this->controllerExists($moduleName, $controllerName, $extension, true))
303+
{
304+
return null;
305+
}
303306
}
304307

305308
$class = $this->controllerClasses[$moduleName.'_'.$controllerName.'_'.$classSuffix];

0 commit comments

Comments
 (0)