mirror of
				https://github.com/Icinga/icingaweb2.git
				synced 2025-10-31 11:24:51 +01: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