Skip to content

fix: fall back to a plain 403 when Leaf\Crash\Pages is unavailable - #68

Merged
mychidarko merged 1 commit into
v5.xfrom
fix/pages-guard-leaf4
Nov 9, 2026
Merged

mychidarko merged 1 commit into
v5.xfrom
fix/pages-guard-leaf4

Conversation

@mychidarko

Copy link
Copy Markdown
Member

The is/isNot/can/cannot middlewares called Pages::error() unguarded, which fatals on Leaf 4 apps (leafs/exception <5 has no Crash\Pages). Approved by Michael on 9 Nov 2026.

  • Leaf 5: same Pages::error() call, same output.
  • Leaf 4: response()->exit('The page you are looking for could not be found.', 403).

Two new tests, one per branch (run in a subprocess since both exit). Suite run against core 5 (67 passed, 1 pre-existing risky) and core 4.4.1 (66 passed, Pages test skipped there). Releases as 5.1.6.

The is/isNot/can/cannot middlewares called Pages::error() unguarded, which
fatals on Leaf 4 apps (leafs/exception <5 has no Crash\Pages). Leaf 5 output
is unchanged; Leaf 4 now gets response()->exit(message, 403).
@mychidarko
mychidarko merged commit 93682d3 into v5.x Nov 9, 2026
10 checks passed
@mychidarko
mychidarko deleted the fix/pages-guard-leaf4 branch November 9, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant