Skip to content

Commit 7ae0675

Browse files
committed
ensure zend_function* passed to nr_php_wraprec_lookup_get is never NULL
1 parent 65515a8 commit 7ae0675

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

agent/php_user_instrument.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,9 @@ void nr_php_user_function_add_declared_callback(const char* namestr,
712712

713713
#if ZEND_MODULE_API_NO >= ZEND_7_4_X_API_NO
714714
nruserfn_t* nr_php_get_wraprec(zend_function* zf) {
715+
if (nrunlikely(NULL == zf)) {
716+
return NULL;
717+
}
715718
return nr_php_wraprec_lookup_get(zf);
716719
}
717720
#else

0 commit comments

Comments
 (0)