Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2014.01, 5.3-dev
-
None
Description
In TemplateDebugInfo::getLegacyTemplatesList a PHP Notice is generated when the usage statistics can not be retrieved thus leaving $templateStats uninitialized.
try { $templateStats = $legacyKernel()->runCallback( function () { return eZTemplate::templatesUsageStatistics(); } ); } catch ( RuntimeException $e ) { // Ignore the exception thrown by legacy kernel as this would break debug toolbar (and thus debug info display). // Furthermore, some legacy kernel handlers don't support runCallback (e.g. ezpKernelTreeMenu) } foreach ( $templateStats as $tplInfo ) { // ... }
The catch could be extended like this
catch ( RuntimeException $e ) { // Ignore the exception thrown by legacy kernel as this would break debug toolbar (and thus debug info display). // Furthermore, some legacy kernel handlers don't support runCallback (e.g. ezpKernelTreeMenu) $templateStats = array(); }