@@ -234,9 +234,9 @@ Changing default labels of the non-debug error screen:
234234
235235 $errorHandler->on('fatal', function ($exception, $debug, $screen) {
236236 if (!$debug && $screen instanceof WebErrorScreen) {
237- $screen->on('render', function (&$view ) {
238- $view ['heading'] = 'It is all your fault!';
239- $view ['text'] = 'You have broken everything and now I hate you.';
237+ $screen->on('render', function ($event ) {
238+ $event ['heading'] = 'It is all your fault!';
239+ $event ['text'] = 'You have broken everything and now I hate you.';
240240 });
241241 }
242242 });
@@ -248,11 +248,11 @@ Adding customized section to the debug screen:
248248 $errorHandler->on('fatal', function ($exception, $debug, $screen) {
249249 if ($debug && $screen instanceof WebErrorScreen) {
250250 $screen
251- ->on('layout.css', function (&$css ) {
252- $css .= '#custom-group {color: #f60000;}';
251+ ->on('layout.css', function ($event ) {
252+ $event[' css'] .= '#custom-group {color: #f60000;}';
253253 })
254- ->on('render.debug', function (&$view ) {
255- $view ['extras'] .= <<<HTML
254+ ->on('render.debug', function ($event ) {
255+ $event ['extras'] .= <<<HTML
256256 <div id="custom-group" class="group">
257257 <div class="section">
258258 Example of a custom section
0 commit comments