mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
Fix Call to a member function getPreferences() on a non-object when not logged in
This commit is contained in:
parent
d03e2fb9d3
commit
71c3fd831f
@ -229,10 +229,11 @@ class ActionController extends Zend_Controller_Action
|
||||
}
|
||||
$this->_helper->layout()->setLayout($target);
|
||||
}
|
||||
$userPreferences = $this->getRequest()->getUser()->getPreferences();
|
||||
if ($userPreferences->get('app.showBenchmark') === true) {
|
||||
Benchmark::measure('Response ready');
|
||||
$this->_helper->layout()->benchmark = $this->renderBenchmark();
|
||||
if ($user = $this->getRequest()->getUser()) {
|
||||
if ($user->getPreferences()->get('app.showBenchmark') === true) {
|
||||
Benchmark::measure('Response ready');
|
||||
$this->_helper->layout()->benchmark = $this->renderBenchmark();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user