ActionController: no benchmark for no renderer

Benchmarks should not be shown when the renderer is no longer available.
This commit is contained in:
Thomas Gelf 2014-09-02 16:49:28 +02:00
parent 8577940e1e
commit 6faedf5733
1 changed files with 3 additions and 1 deletions

View File

@ -348,7 +348,9 @@ class ActionController extends Zend_Controller_Action
// Cast preference app.show_benchmark to bool because preferences loaded from a preferences storage are // Cast preference app.show_benchmark to bool because preferences loaded from a preferences storage are
// always strings // always strings
if ((bool) $user->getPreferences()->get('app.show_benchmark', false) === true) { if ((bool) $user->getPreferences()->get('app.show_benchmark', false) === true) {
$layout->benchmark = $this->renderBenchmark(); if (!$this->_helper->viewRenderer->getNoRender()) {
$layout->benchmark = $this->renderBenchmark();
}
} }
} }