summaryrefslogtreecommitdiffstats
path: root/10.patch
blob: ff4a5630ab1c2ab35db8cfb72a71491bff6cc8df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 917069332cb88706202ea70fd06f762944271cf9 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 17 Jul 2025 16:41:44 +0200
Subject: [PATCH] SPL is always there

---
 common.cpp   | 2 --
 php_trie.cpp | 5 -----
 2 files changed, 7 deletions(-)

diff --git a/common.cpp b/common.cpp
index 1673811..65e1dfb 100644
--- a/common.cpp
+++ b/common.cpp
@@ -23,9 +23,7 @@ using namespace trie;
 #include "config.h"
 #endif
 
-#ifdef HAVE_SPL
 #include "ext/spl/spl_exceptions.h"
-#endif
 
 /* For compatibility with older PHP versions */
 #ifndef ZEND_PARSE_PARAMETERS_NONE
diff --git a/php_trie.cpp b/php_trie.cpp
index c6081bc..2c17f76 100644
--- a/php_trie.cpp
+++ b/php_trie.cpp
@@ -530,13 +530,8 @@ PHP_MINIT_FUNCTION(php_trie)
                                    sizeof("DEFAULT_BURST_THRESHOLD") - 1,
                                    DEFAULT_BURST_THRESHOLD);
 
-#ifdef HAVE_SPL
   phptrie_exception_ce = zend_register_internal_class_ex(
       &exception_ce, spl_ce_RuntimeException);
-#else
-  phptrie_exception_ce = zend_register_internal_class_ex(
-      &exception_ce, zend_exception_get_default());
-#endif
 
   zend_class_implements(phphattrie_ce, 2, zend_ce_arrayaccess, php_json_serializable_ce);
   zend_class_implements(phptrie_ce, 2, zend_ce_arrayaccess, php_json_serializable_ce);