File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ public function processException(\Throwable $e): void
179
179
$ this ->httpResponse ->setCode ($ e instanceof BadRequestException ? ($ e ->getHttpCode () ?: 404 ) : 500 );
180
180
}
181
181
182
- $ args = ['exception ' => $ e , 'request ' => end ($ this ->requests ) ?: null ];
182
+ $ args = ['exception ' => $ e , 'request ' => Arrays:: last ($ this ->requests ) ?: null ];
183
183
if ($ this ->presenter instanceof UI \Presenter) {
184
184
try {
185
185
$ this ->presenter ->forward (": $ this ->errorPresenter : " , $ args );
Original file line number Diff line number Diff line change @@ -463,7 +463,7 @@ public function sendTemplate(Template $template = null): void
463
463
}
464
464
465
465
if (!$ template ->getFile ()) {
466
- $ file = strtr (reset ($ files ), '/ ' , DIRECTORY_SEPARATOR );
466
+ $ file = strtr (Arrays:: first ($ files ), '/ ' , DIRECTORY_SEPARATOR );
467
467
$ this ->error ("Page not found. Missing template ' $ file'. " );
468
468
}
469
469
}
@@ -489,7 +489,7 @@ public function findLayoutTemplateFile(): ?string
489
489
}
490
490
491
491
if ($ this ->layout ) {
492
- $ file = strtr (reset ($ files ), '/ ' , DIRECTORY_SEPARATOR );
492
+ $ file = strtr (Arrays:: first ($ files ), '/ ' , DIRECTORY_SEPARATOR );
493
493
throw new Nette \FileNotFoundException ("Layout not found. Missing template ' $ file'. " );
494
494
}
495
495
return null ;
You can’t perform that action at this time.
0 commit comments