Skip to content

Commit

Permalink
Do not hook disabled functions (#4283)
Browse files Browse the repository at this point in the history
  • Loading branch information
twose authored Jun 29, 2021
1 parent a11aa99 commit db3d335
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext-src/swoole_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,11 @@ static void hook_func(const char *name, size_t l_name, zif_handler handler, zend
if (zf == nullptr) {
return;
}
#if PHP_VERSION_ID < 80000
if (zf->internal_function.handler == ZEND_FN(display_disabled_function)) {
return;
}
#endif

rf = (real_func *) emalloc(sizeof(real_func));
sw_memset_zero(rf, sizeof(*rf));
Expand Down

0 comments on commit db3d335

Please sign in to comment.