From: sgunderson@bigfoot.com <> Date: Thu, 22 Sep 2011 21:03:46 +0000 (+0200) Subject: Fix is_associative_array() in php5-swig. X-Git-Url: https://git.sesse.net/?p=xml-template;a=commitdiff_plain;h=b6bae3e8cf33edf6bbedcf6d3266e581d06507af Fix is_associative_array() in php5-swig. --- 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; } }