Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Catches error thrown from Twig v 1.21 and newer #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Catches error thrown from Twig v 1.21 and newer #51

wants to merge 1 commit into from

Conversation

ffflabs
Copy link

@ffflabs ffflabs commented Nov 2, 2015

Since Twig 1.21 (twigphp/Twig@cc98028) using Twig_Loaders is deprecated, and triggers a silent error using @ supressor. However, certain middlewares such as Whoops will still stop the normal flow.

This PR wraps the Twig_Loader usage in a try/catch block, silently sending an eventual error to Slim's log. If the user's dependency has a Twig version prior to 1.21, it behaves just as usual.

Since Twig 1.21 (twigphp/Twig@cc98028) using Twig_Loaders is deprecated, and triggers a silent error using @ supressor. However, certain middlewares such as Whoops will still stop the normal flow.
@ffflabs
Copy link
Author

ffflabs commented Nov 2, 2015

PD: this is related to #47

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant