Skip to content

Commit 7e56ae9

Browse files
committed
fix(agent): remove unwanted error reporting by overwriting zend_error_cb instead of using OAPI
1 parent 86f7753 commit 7e56ae9

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

agent/php_minit.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,6 @@ void nr_php_late_initialization(void) {
769769
* our own error callback handler. Otherwise, we do.
770770
*/
771771

772-
#if ZEND_MODULE_API_NO < ZEND_8_0_X_API_NO \
773-
|| defined OVERWRITE_ZEND_EXECUTE_DATA /* < PHP8 */
774772
if (0 == zend_get_extension("Xdebug")) {
775773
NR_PHP_PROCESS_GLOBALS(orig_error_cb) = zend_error_cb;
776774
zend_error_cb = nr_php_error_cb;
@@ -779,7 +777,6 @@ void nr_php_late_initialization(void) {
779777
"the Xdebug extension prevents the New Relic agent from "
780778
"gathering errors. No errors will be recorded.");
781779
}
782-
#endif /* end of < PHP8 or not using OAPI*/
783780

784781
/*
785782
* Install our signal handler, unless the user has set a special flag

agent/php_observer.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ void nr_php_observer_minit() {
9494
* Register the Observer API handlers.
9595
*/
9696
zend_observer_fcall_register(nr_php_fcall_register_handlers);
97-
zend_observer_error_register(nr_php_error_cb);
9897

9998
/*
10099
* For Observer API with PHP 8+, we no longer need to ovewrwrite the zend

0 commit comments

Comments
 (0)