Skip to content

Commit 8d30ed4

Browse files
arnaud-lbiluuu1994
authored andcommitted
Fix compiler warning in zend_test
Closes GH-16650
1 parent 56381e8 commit 8d30ed4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/zend_test/observer.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ static ZEND_INI_MH(zend_test_observer_OnUpdateCommaList)
315315
}
316316
if (stage != PHP_INI_STAGE_STARTUP && stage != PHP_INI_STAGE_ACTIVATE && stage != PHP_INI_STAGE_DEACTIVATE && stage != PHP_INI_STAGE_SHUTDOWN) {
317317
ZEND_HASH_FOREACH_STR_KEY(*p, funcname) {
318-
if ((func = zend_hash_find_ptr(EG(function_table), funcname)) && ZEND_OBSERVER_DATA(func) != NULL) {
318+
if ((func = zend_hash_find_ptr(EG(function_table), funcname))) {
319319
void *old_handler;
320320
zend_observer_remove_begin_handler(func, observer_begin, (zend_observer_fcall_begin_handler *)&old_handler);
321321
zend_observer_remove_end_handler(func, observer_end, (zend_observer_fcall_end_handler *)&old_handler);
@@ -338,7 +338,7 @@ static ZEND_INI_MH(zend_test_observer_OnUpdateCommaList)
338338
zend_string_release(str);
339339
if (stage != PHP_INI_STAGE_STARTUP && stage != PHP_INI_STAGE_ACTIVATE && stage != PHP_INI_STAGE_DEACTIVATE && stage != PHP_INI_STAGE_SHUTDOWN) {
340340
ZEND_HASH_FOREACH_STR_KEY(*p, funcname) {
341-
if ((func = zend_hash_find_ptr(EG(function_table), funcname)) && ZEND_OBSERVER_DATA(func) != NULL) {
341+
if ((func = zend_hash_find_ptr(EG(function_table), funcname))) {
342342
zend_observer_add_begin_handler(func, observer_begin);
343343
zend_observer_add_end_handler(func, observer_end);
344344
}

0 commit comments

Comments
 (0)