From cbd975ae0cd3da8df6ff480eedc0f57416d71e83 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Thu, 14 Jul 2011 12:18:50 +0100 Subject: [PATCH] Use the proper zend hash function here. --- twig.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/twig.c b/twig.c index f62b133..7d0b60d 100644 --- a/twig.c +++ b/twig.c @@ -119,16 +119,11 @@ PHP_MINFO_FUNCTION(twig) int TWIG_ARRAY_KEY_EXISTS(zval *array, zval *key) { - void *dummy; - if (Z_TYPE_P(array) != IS_ARRAY) { return 0; } convert_to_string(key); - if (zend_symtable_find(Z_ARRVAL_P(array), Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &dummy) == SUCCESS) { - return 1; - } - return 0; + return zend_symtable_exists(Z_ARRVAL_P(array), Z_STRVAL_P(key), Z_STRLEN_P(key) + 1); } int TWIG_INSTANCE_OF(zval *object, zend_class_entry *interface TSRMLS_DC) -- 1.7.2.5