From e16624fd1c5e09f28ccd65cdce64dc9eb0959a4a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Nahan <814683+macintoshplus@users.noreply.github.com> Date: Mon, 6 Oct 2025 17:54:19 +0200 Subject: [PATCH] check php version --- lua.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua.c b/lua.c index 3e8c1e2..f9ad079 100755 --- a/lua.c +++ b/lua.c @@ -867,8 +867,11 @@ PHP_MINIT_FUNCTION(lua) { php_lua_closure_register(); INIT_CLASS_ENTRY(ce, "LuaException", NULL); - +#if PHP_VERSION_ID >= 80500 lua_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_exception); +#else + lua_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default()); +#endif return SUCCESS; }