From 9096e3f7344b8bb34d01027c3162b19fa5cb5592 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 8 Jul 2011 12:50:26 +0100 Subject: [PATCH] Use strtolower on the method names and add them as associative keys so that they are found. This makes method calls work. --- twig.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/twig.c b/twig.c index 26ef899..59d2b18 100644 --- a/twig.c +++ b/twig.c @@ -445,8 +445,9 @@ char *TWIG_GET_CLASS_NAME(zval *object) static void twig_add_method_to_class(zend_function *mptr TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) { zval *retval = va_arg(args, zval*); + char *item = php_strtolower(mptr->common.function_name, strlen(mptr->common.function_name)); - add_next_index_string(retval, mptr->common.function_name, 1); + add_assoc_string(retval, item, item, 1); } static int twig_add_property_to_class(zend_property_info *pptr TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) -- 1.7.2.5