]> git.sesse.net Git - xml-template/blobdiff - php5-swig/xml-template.swig
Fix is_associative_array() in php5-swig.
[xml-template] / php5-swig / xml-template.swig
index 5a560cee6883bf4bce903964fe653ee2755a71c5..d395ac20a72cc097ed7335b8dde68b7f6af1776a 100644 (file)
@@ -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;
                }
        }