Skip to content

Commit 9c652bf

Browse files
committed
Returned null if the requested controller does ont exist, as promised in the method docblock.
1 parent 573d579 commit 9c652bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/controller/sfController.class.php

+4-1
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)