From: Remi Collet <fedora@xxxxxxxxxxxxxxxxx> --- src/libvirt-php.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libvirt-php.c b/src/libvirt-php.c index 3ce8370..3dba7a0 100644 --- a/src/libvirt-php.c +++ b/src/libvirt-php.c @@ -3040,7 +3040,11 @@ PHP_FUNCTION(libvirt_connect_get_all_domain_stats) } } name = virDomainGetName(retstats[i]->dom); +#if PHP_MAJOR_VERSION >= 7 + zend_hash_update(Z_ARRVAL_P(return_value), zend_string_init(name, strlen(name), 0), arr2); +#else zend_hash_update(Z_ARRVAL_P(return_value), name, strlen(name)+1, &arr2, sizeof(arr2), NULL); +#endif } virDomainStatsRecordListFree(retstats); -- 2.5.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list