Skip to content

Commit 533dd66

Browse files
RomainNaourjacmet
authored andcommitted
package/php-lua: add support for php >= 8.5
Our php package was recently update to 8.5 version [1] but this version removed some old function like zend_exception_get_default() [2]. But php-lua still uses zend_exception_get_default(). Replace zend_exception_get_default() by zend_ce_exception as suggested by php project. [1] aedf131 [2] php/php-src@a812a74 Fixes: https://gitlab.com/buildroot.org/buildroot/-/jobs/12944797268 (TestPhpLuaLua) https://gitlab.com/buildroot.org/buildroot/-/jobs/12944797270 (TestPhpLuaLuajit) Signed-off-by: Romain Naour <romain.naour@smile.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
1 parent 995196e commit 533dd66

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
From 2c8b642b70edf5b0602b10a25d3f04874e175276 Mon Sep 17 00:00:00 2001
2+
From: Romain Naour <romain.naour@smile.fr>
3+
Date: Mon, 2 Feb 2026 22:12:48 +0100
4+
Subject: [PATCH] add support for php >= 8.5
5+
6+
php removed zend_exception_get_default() and replaced by zend_ce_exception.
7+
8+
[1] https://github.com/php/php-src/commit/a812a74c2e60a0ba080057067a7634e4da3f2b9b
9+
10+
Upstream: upstream dead, custom patch
11+
Signed-off-by: Romain Naour <romain.naour@smile.fr>
12+
---
13+
lua.c | 4 ++++
14+
1 file changed, 4 insertions(+)
15+
16+
diff --git a/lua.c b/lua.c
17+
index 5889bc7..62f8f0a 100755
18+
--- a/lua.c
19+
+++ b/lua.c
20+
@@ -871,7 +871,11 @@ PHP_MINIT_FUNCTION(lua) {
21+
22+
INIT_CLASS_ENTRY(ce, "LuaException", NULL);
23+
24+
+#if ((PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 5)) || (PHP_MAJOR_VERSION < 5)
25+
lua_exception_ce = zend_register_internal_class_ex(&ce, zend_exception_get_default());
26+
+#else
27+
+ lua_exception_ce = zend_register_internal_class_ex(&ce, zend_ce_exception);
28+
+#endif
29+
30+
return SUCCESS;
31+
}
32+
--
33+
2.52.0
34+

0 commit comments

Comments
 (0)