File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -289,12 +289,12 @@ public function run($callback = null)
289289
290290 // If no route was handled, trigger the 404 (if any)
291291 if ($ numHandled === 0 ) {
292- $ this ->trigger404 ($ this ->afterRoutes [$ this ->requestedMethod ]);
293- } // If a route was handled, perform the finish callback (if any)
294- else {
295- if ($ callback && is_callable ($ callback )) {
296- $ callback ();
292+ if (isset ($ this ->afterRoutes [$ this ->requestedMethod ])) {
293+ $ this ->trigger404 ($ this ->afterRoutes [$ this ->requestedMethod ]);
297294 }
295+ } // If a route was handled, perform the finish callback (if any)
296+ elseif ($ callback && is_callable ($ callback )) {
297+ $ callback ();
298298 }
299299
300300 // If it originally was a HEAD request, clean up after ourselves by emptying the output buffer
You can’t perform that action at this time.
0 commit comments