We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1facbc3 commit ffb4405Copy full SHA for ffb4405
ext/pcre/php_pcre.c
@@ -494,8 +494,10 @@ static int pcre_clean_cache(zval *data, void *arg)
494
pcre_cache_entry *pce = (pcre_cache_entry *) Z_PTR_P(data);
495
int *num_clean = (int *)arg;
496
497
- if (*num_clean > 0 && !pce->refcount) {
498
- (*num_clean)--;
+ if (!pce->refcount) {
+ if (--(*num_clean) == 0) {
499
+ return ZEND_HASH_APPLY_REMOVE|ZEND_HASH_APPLY_STOP;
500
+ }
501
return ZEND_HASH_APPLY_REMOVE;
502
} else {
503
return ZEND_HASH_APPLY_KEEP;
0 commit comments