diff --git a/code/controllers/ModelAsController.php b/code/controllers/ModelAsController.php index f5455d8e..c1d260f8 100644 --- a/code/controllers/ModelAsController.php +++ b/code/controllers/ModelAsController.php @@ -24,7 +24,7 @@ class ModelAsController extends Controller implements NestedController { $controller = $controller . '_' . ucfirst($action); } - return class_exists($controller) ? new $controller($sitetree) : $sitetree; + return class_exists($controller) ? Injector::inst()->create($controller, $sitetree) : $sitetree; } public function init() {