Check the property regardless of whether tmp_item is valid/set.
authorDerick Rethans <github@derickrethans.nl>
Thu, 7 Jul 2011 13:05:38 +0000 (14:05 +0100)
committerDerick Rethans <github@derickrethans.nl>
Thu, 7 Jul 2011 13:05:38 +0000 (14:05 +0100)
twig.c

diff --git a/twig.c b/twig.c
index 8b7b84b..c18b4a6 100644 (file)
--- a/twig.c
+++ b/twig.c
@@ -660,10 +660,7 @@ PHP_FUNCTION(twig_template_get_attributes)
                tmp_properties = TWIG_GET_ARRAY_ELEMENT(tmp_class, "properties", strlen("properties"));
                tmp_item = TWIG_GET_ARRAY_ELEMENT_ZVAL(tmp_properties, item);
 
-               if (tmp_item) {
-                       convert_to_string(tmp_item);
-                       tmp_object_item = TWIG_PROPERTY(object, Z_STRVAL_P(tmp_item));
-               }
+               tmp_object_item = TWIG_PROPERTY(object, item);
 
                if (tmp_item || tmp_object_item || TWIG_ARRAY_KEY_EXISTS(object, item) // FIXME: Array key? is that array access here?
                ) {