From f0cc4fda1b17474f3b5c9593c373edd95684db03 Mon Sep 17 00:00:00 2001 From: CismonX Date: Thu, 16 Aug 2018 20:17:13 +0800 Subject: [PATCH] Fix `retainAll()`. Update .gitignore --- .gitignore | 1 + src/collections_methods.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index f56bccc..5490167 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ config.status config.sub configure configure.in +configure.ac include install-sh libtool diff --git a/src/collections_methods.c b/src/collections_methods.c index d8dfc4a..47dd7b0 100644 --- a/src/collections_methods.c +++ b/src/collections_methods.c @@ -1857,17 +1857,11 @@ PHP_METHOD(Collection, retainAll) { zend_fcall_info fci; zend_fcall_info_cache fcc; - ZEND_PARSE_PARAMETERS_START(0, 1) - Z_PARAM_OPTIONAL + ZEND_PARSE_PARAMETERS_START(1, 1) Z_PARAM_FUNC(fci, fcc) ZEND_PARSE_PARAMETERS_END(); zend_array* current = COLLECTION_FETCH_CURRENT(); SEPARATE_CURRENT_COLLECTION(current); - if (EX_NUM_ARGS() == 0) - { - zend_hash_clean(current); - return; - } INIT_FCI(&fci, 2); ZEND_HASH_FOREACH_BUCKET(current, Bucket* bucket) CALLBACK_KEYVAL_INVOKE(params, bucket);