Commit 32e02ba0 authored by Ad Schellevis's avatar Ad Schellevis

(crashreport) something seems to trigger Phalcon\Mvc\View->render() before...

(crashreport) something seems to trigger Phalcon\Mvc\View->render() before initialize() was called, not sure what it is, probably something changed in phalcon to trigger this in some cases.

exception 'Exception' with message 'The argument is not initialized or iterable()' in phalcon/mvc/view.zep:694
Stack trace:
 0 [internal function]: Phalcon\Mvc\View->_engineRender(Array, 'settings/listRu...', true, true, NULL)
 1 [internal function]: Phalcon\Mvc\View->render('settings', 'listRulesets', Array)
 2 /usr/local/opnsense/www/api.php(26): Phalcon\Mvc\Application->handle()
parent 3fdb5a93
...@@ -44,6 +44,7 @@ $di = new FactoryDefault(); ...@@ -44,6 +44,7 @@ $di = new FactoryDefault();
$di->set('view', function () use ($config) { $di->set('view', function () use ($config) {
// return a empty view // return a empty view
$view = new View(); $view = new View();
$view->disable();
return $view; return $view;
}); });
......
...@@ -90,7 +90,6 @@ class ApiControllerBase extends ControllerRoot ...@@ -90,7 +90,6 @@ class ApiControllerBase extends ControllerRoot
public function initialize() public function initialize()
{ {
// disable view processing // disable view processing
$this->view->disable();
set_error_handler(array($this, 'APIErrorHandler')); set_error_handler(array($this, 'APIErrorHandler'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment