From b6bae3e8cf33edf6bbedcf6d3266e581d06507af Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Thu, 22 Sep 2011 23:03:46 +0200 Subject: [PATCH] Fix is_associative_array() in php5-swig. --- php5-swig/xml-template.swig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/php5-swig/xml-template.swig b/php5-swig/xml-template.swig index 5a560ce..d395ac2 100644 --- a/php5-swig/xml-template.swig +++ b/php5-swig/xml-template.swig @@ -10,9 +10,7 @@ bool is_associative_array(HashTable *ht) return true; } for (unsigned i = 0; i < ht->nNumOfElements; ++i) { - char buf[32]; - sprintf(buf, "%u", i); - if (!zend_hash_exists(ht, buf, strlen(buf))) { + if (!zend_hash_index_exists(ht, i)) { return true; } } -- 2.39.2