summaryrefslogtreecommitdiffstats
path: root/6.patch
blob: a7cbd1fcde32871b5a2697bc9a7a23d1c2e8276d (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
From cdc9220d8585011cf48fbbb82f2d2a6b2b3352ac Mon Sep 17 00:00:00 2001
From: Peter Kokot <peterkokot@gmail.com>
Date: Thu, 27 Jun 2019 00:43:21 +0200
Subject: [PATCH] Remove HAVE_SPL

The HAVE_SPL symbol is defined in PHP to indicate the presence of the
spl extension. Since PHP 5.3 the spl extension is always availabe and
since PHP-7.4 the HAVE_SPL symbol has also been removed.
---
 mysqlx_exception.cc | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/mysqlx_exception.cc b/mysqlx_exception.cc
index a2e423d6..5fc2883e 100644
--- a/mysqlx_exception.cc
+++ b/mysqlx_exception.cc
@@ -19,9 +19,7 @@
 extern "C" {
 #include <zend_exceptions.h>
 #include "mysqlnd_api.h"
-#ifdef HAVE_SPL
 #include <ext/spl/spl_exceptions.h> /* spl_ce_RuntimeException */
-#endif
 }
 #include "xmysqlnd/xmysqlnd.h"
 #include "php_mysqlx.h"
@@ -140,11 +138,7 @@ mysqlx_register_exception_class(UNUSED_INIT_FUNC_ARGS, zend_object_handlers * my
 	{
 		zend_class_entry tmp_ce;
 		INIT_NS_CLASS_ENTRY(tmp_ce, "mysql_xdevapi", "Exception", mysqlx_exception_methods);
-#ifdef HAVE_SPL
 		mysqlx_exception_class_entry = zend_register_internal_class_ex(&tmp_ce, spl_ce_RuntimeException);
-#else
-		mysqlx_exception_class_entry = zend_register_internal_class_ex(&tmp_ce, zend_ce_exception);
-#endif
 	}
 
 	zend_hash_init(&mysqlx_exception_properties, 0, nullptr, mysqlx_free_property_cb, 1);