From e9c3eda05def78b46ee78cb147528776954a1550 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Mon, 18 Jul 2011 18:46:39 +0100 Subject: [PATCH] - Fixed code that was previously never hit. --- twig.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/twig.c b/twig.c index 6fc3973..f6f4e67 100644 --- a/twig.c +++ b/twig.c @@ -908,11 +908,11 @@ PHP_FUNCTION(twig_template_get_attributes) if (isDefinedTest) { RETURN_FALSE; } - zval *env = TWIG_PROPERTY_CHAR(template, "env"); - if (TWIG_CALL_B_0(env, "isStrictVariables")) { + if (!TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env"), "isStrictVariables")) { return; } - TWIG_THROW_EXCEPTION("Twig_Error_Runtime", "Method \"%s\" for object \"%s\" does not exist", item, TWIG_GET_CLASS(object)); + TWIG_THROW_EXCEPTION("Twig_Error_Runtime", "Method \"%s\" for object \"%s\" does not exist", Z_STRVAL_P(item), TWIG_GET_CLASS_NAME(object)); + return; } if (isDefinedTest) { efree(tmp_method_name_get); -- 1.7.2.5