diff options
Diffstat (limited to 'ext/zip/php_zip.c')
-rw-r--r-- | ext/zip/php_zip.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 841488bd61..de3a695d96 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -2884,15 +2884,11 @@ static void _php_zip_progress_callback(zip_t *arch, double state, void *ptr) PHP_METHOD(ZipArchive, registerProgressCallback) { struct zip *intern; - zval *self = getThis(); + zval *self = ZEND_THIS; double rate; zval *callback; ze_zip_object *obj; - if (!self) { - RETURN_FALSE; - } - if (zend_parse_parameters(ZEND_NUM_ARGS(), "dz", &rate, &callback) == FAILURE) { return; } @@ -2942,14 +2938,10 @@ static int _php_zip_cancel_callback(zip_t *arch, void *ptr) PHP_METHOD(ZipArchive, registerCancelCallback) { struct zip *intern; - zval *self = getThis(); + zval *self = ZEND_THIS; zval *callback; ze_zip_object *obj; - if (!self) { - RETURN_FALSE; - } - if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &callback) == FAILURE) { return; } |