Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EZP-22513: Exception not thrown when twig template does not exist #781

Merged
merged 1 commit into from Mar 25, 2014

Conversation

4 participants
@lolautruche
Copy link
Contributor

commented Mar 24, 2014

https://jira.ez.no/browse/EZP-22513

Description

We use Twig_Loader_Chain as loader, where Twig_Loader_Filesystem is first checked, Twig_Loader_String then.
When a template fails to be loaded by Twig_Loader_Filesystem (method exists()), Twig_Loader_String is then checked. The problem is that Twig_Loader_String always returns true since passed template name is supposed to be the template itself.

@joaoinacio

This comment has been minimized.

Copy link
Contributor

commented Mar 24, 2014

Looks good, +1 FWIW

@@ -0,0 +1,36 @@
<?php
/**
* Created by PhpStorm.

This comment has been minimized.

Copy link
@pspanja

pspanja Mar 24, 2014

Contributor

Wrong file/licence header.

@pspanja

This comment has been minimized.

Copy link
Contributor

commented Mar 24, 2014

+1 aside from header issue.

@andrerom

This comment has been minimized.

Copy link
Member

commented Mar 24, 2014

+1, would it make sense to propose it upstream? Or is this not really supposed to be used?

@lolautruche lolautruche merged commit 8e1231d into master Mar 25, 2014

1 check passed

default The Travis CI build passed
Details

@lolautruche lolautruche deleted the fix_EZP-22513_ExceptionWhenTemplateDontExist branch Mar 25, 2014

@lolautruche

This comment has been minimized.

Copy link
Contributor Author

commented Mar 25, 2014

@andrerom It's not supposed to be used, except in very specific cases like for us and unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.