Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit c210e2f

Browse files
committed
Declare $previous prior to declaring closure
- Ensures reference exists.
1 parent a307b56 commit c210e2f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Application.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,7 @@ private function checkForDuplicateRoute($path, $methods = null)
677677
*/
678678
private function swallowDeprecationNotices()
679679
{
680+
$previous = null;
680681
$handler = function ($errno, $errstr, $errfile, $errline, $errcontext) use (&$previous) {
681682
$swallow = $errno === E_USER_DEPRECATED && false !== strstr($errstr, 'error middleware is deprecated');
682683

0 commit comments

Comments
 (0)