Skip to content

Commit 3946ab3

Browse files
committed
feat(agent): update php_module_startup for PHP >= 8.2
1 parent b02b237 commit 3946ab3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

agent/tests/tlib_php.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,15 @@ nr_status_t tlib_php_engine_create(const char* extra_ini PTSRMLS_DC) {
301301
/*
302302
* Actually start the Zend Engine.
303303
*/
304-
if (FAILURE == php_module_startup(&tlib_module, &newrelic_module_entry, 1)) {
304+
#if ZEND_MODULE_API_NO >= ZEND_8_2_X_API_NO
305+
if (FAILURE == php_module_startup(&tlib_module, &newrelic_module_entry)) {
305306
return NR_FAILURE;
306307
}
308+
#else
309+
if (FAILURE == php_module_startup(&tlib_module, &newrelic_module_entry, 1)) {
310+
return NR_FAILURE;
311+
}
312+
#endif
307313

308314
/*
309315
* As noted above, we now replace the interned string callbacks on PHP

0 commit comments

Comments
 (0)