From 1da5df8029a90d3dbe30ac54d33d502287ec4a9e Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 21 Jul 2021 09:13:52 +0200 Subject: [PATCH] Don't enable rc_debug mode if module startup fails --- main/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/main.c b/main/main.c index 33fa6cea60f..0f56ef3d930 100644 --- a/main/main.c +++ b/main/main.c @@ -2349,7 +2349,9 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod zend_interned_strings_switch_storage(1); #if ZEND_RC_DEBUG - zend_rc_debug = 1; + if (retval == SUCCESS) { + zend_rc_debug = 1; + } #endif /* we're done */