File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -742,8 +742,10 @@ PHP_MINIT_FUNCTION(frankenphp) {
742742 php_error (E_WARNING , "Failed to find built-in getenv function" );
743743 }
744744
745+ #if PHP_VERSION_ID >= 80300
745746 // Override opcache_reset (may not be available yet if opcache loads after us)
746747 frankenphp_override_opcache_reset ();
748+ #endif
747749
748750 return SUCCESS ;
749751}
@@ -765,9 +767,11 @@ static int frankenphp_startup(sapi_module_struct *sapi_module) {
765767
766768 int result = php_module_startup (sapi_module , & frankenphp_module );
767769 if (result == SUCCESS ) {
770+ #if PHP_VERSION_ID >= 80300
768771 /* All extensions are now loaded. Override opcache_reset if opcache
769772 * was not yet available during our MINIT (shared extension load order). */
770773 frankenphp_override_opcache_reset ();
774+ #endif
771775 }
772776
773777 return result ;
@@ -1232,7 +1236,9 @@ bool frankenphp_new_php_thread(uintptr_t thread_index) {
12321236static int frankenphp_request_startup () {
12331237 frankenphp_update_request_context ();
12341238 if (php_request_startup () == SUCCESS ) {
1239+ #if PHP_VERSION_ID >= 80300
12351240 frankenphp_override_opcache_reset ();
1241+ #endif
12361242 return SUCCESS ;
12371243 }
12381244
You can’t perform that action at this time.
0 commit comments