diff options
author | Dmitry Stogov <dmitry@zend.com> | 2018-07-04 19:22:24 +0300 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2018-07-04 19:22:24 +0300 |
commit | 4a475a4976db92e71949786cdf5990c61514261e (patch) | |
tree | 6934c9e00200e6388256656b8fa71c97a1a3a158 /ext/imap/php_imap.c | |
parent | d798fd491be77943fb751ad97d85475bf324192c (diff) | |
download | php-git-4a475a4976db92e71949786cdf5990c61514261e.tar.gz |
Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index d5f07a3e22..86b0011f09 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1436,7 +1436,7 @@ PHP_FUNCTION(imap_get_quota) mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); if (!imap_getquota(imap_le_struct->imap_stream, ZSTR_VAL(qroot))) { php_error_docref(NULL, E_WARNING, "c-client imap_getquota failed"); - zval_dtor(return_value); + zend_array_destroy(Z_ARR_P(return_value)); RETURN_FALSE; } } @@ -1465,7 +1465,7 @@ PHP_FUNCTION(imap_get_quotaroot) mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); if (!imap_getquotaroot(imap_le_struct->imap_stream, ZSTR_VAL(mbox))) { php_error_docref(NULL, E_WARNING, "c-client imap_getquotaroot failed"); - zval_dtor(return_value); + zend_array_destroy(Z_ARR_P(return_value)); RETURN_FALSE; } } @@ -1542,7 +1542,7 @@ PHP_FUNCTION(imap_getacl) mail_parameters(NIL, SET_ACL, (void *) mail_getacl); if (!imap_getacl(imap_le_struct->imap_stream, ZSTR_VAL(mailbox))) { php_error(E_WARNING, "c-client imap_getacl failed"); - zval_dtor(return_value); + zend_array_destroy(Z_ARR_P(return_value)); RETURN_FALSE; } @@ -4290,7 +4290,7 @@ PHP_FUNCTION(imap_mime_header_decode) } if (decode == NULL) { efree(charset); - zval_dtor(return_value); + zend_array_destroy(Z_ARR_P(return_value)); RETURN_FALSE; } object_init(&myobject); |