From: Derick Rethans Date: Wed, 13 Jul 2011 15:27:35 +0000 (+0100) Subject: Bailout when we have an exception to defer to PHP's exception handlers. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=52b9ae44bb05d6e45f93969e81a630dd875acecb;p=web%2Fkonrad%2Ftwig.git Bailout when we have an exception to defer to PHP's exception handlers. --- diff --git a/twig.c b/twig.c index 7712d93..b641bd0 100644 --- a/twig.c +++ b/twig.c @@ -736,6 +736,9 @@ PHP_FUNCTION(twig_template_get_attributes) if (TWIG_CALL_SB(TWIG_PROPERTY_CHAR(template, "env"), "hasExtension", "sandbox")) { TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env"), "getExtension", "sandbox"), "checkPropertyAllowed", object, item); } + if (EG(exception)) { + return; + } convert_to_string(item); ret = TWIG_PROPERTY(object, item); @@ -818,6 +821,9 @@ PHP_FUNCTION(twig_template_get_attributes) if (TWIG_CALL_SB(TWIG_PROPERTY_CHAR(template, "env"), "hasExtension", "sandbox")) { TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env"), "getExtension", "sandbox"), "checkMethodAllowed", object, item); } + if (EG(exception)) { + return; + } /* $ret = call_user_func_array(array($object, $method), $arguments); */