From 0c26d905421b2a7e4df3b00c7093b15e9dee34a8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Nahan <814683+macintoshplus@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:52:13 +0200 Subject: [PATCH] Fix zend_ce_exception for PHP 8.5 --- svm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/svm.c b/svm.c index bdc8da4..6607882 100755 --- a/svm.c +++ b/svm.c @@ -1373,7 +1373,11 @@ PHP_MINIT_FUNCTION(svm)/*{{{*/ php_svm_model_sc_entry = zend_register_internal_class(&ce); INIT_CLASS_ENTRY(ce, "svmexception", NULL); +#if PHP_VERSION_ID < 80500 php_svm_exception_sc_entry = zend_register_internal_class_ex(&ce, zend_exception_get_default()); +#else + php_svm_exception_sc_entry = zend_register_internal_class_ex(&ce, zend_ce_exception); +#endif php_svm_exception_sc_entry->ce_flags |= ZEND_ACC_FINAL; /* Redirect the lib svm output */