We need to use strlen on hash keys.
authorDerick Rethans <github@derickrethans.nl>
Thu, 7 Jul 2011 13:05:21 +0000 (14:05 +0100)
committerDerick Rethans <github@derickrethans.nl>
Thu, 7 Jul 2011 13:05:21 +0000 (14:05 +0100)
twig.c

diff --git a/twig.c b/twig.c
index e93e5f5..8b7b84b 100644 (file)
--- a/twig.c
+++ b/twig.c
@@ -657,7 +657,7 @@ PHP_FUNCTION(twig_template_get_attributes)
                zval *tmp_class, *tmp_properties, *tmp_item, *tmp_object_item = NULL;
 
                tmp_class = TWIG_GET_ARRAY_ELEMENT(tmp_self_cache, class_name, strlen(class_name));
-               tmp_properties = TWIG_GET_ARRAY_ELEMENT(tmp_class, "properties", sizeof("properties"));
+               tmp_properties = TWIG_GET_ARRAY_ELEMENT(tmp_class, "properties", strlen("properties"));
                tmp_item = TWIG_GET_ARRAY_ELEMENT_ZVAL(tmp_properties, item);
 
                if (tmp_item) {