summaryrefslogtreecommitdiff
path: root/Lib/php
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-12-08 13:06:16 +1300
committerOlly Betts <olly@survex.com>2021-12-08 13:10:38 +1300
commitc0c7a8dba06c2dc0fddb6d1e9e56f3eab0fb8271 (patch)
treeef12f89cd227f45f372be345329fe9d9e54c3210 /Lib/php
parent7246cfa6c6e1877cd679a23970da477cad039a28 (diff)
downloadswig-c0c7a8dba06c2dc0fddb6d1e9e56f3eab0fb8271.tar.gz
[php] Fix two incorrect PHP 8 conditionals
The correct macro to test is PHP_MAJOR_VERSION so these two PHP 8 cases weren't ever used, which hid that the PHP8 version of the code was broken in one of them. Highlighted in #2113.
Diffstat (limited to 'Lib/php')
-rw-r--r--Lib/php/phpinterfaces.i2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/php/phpinterfaces.i b/Lib/php/phpinterfaces.i
index dda219d91..5b1da8b79 100644
--- a/Lib/php/phpinterfaces.i
+++ b/Lib/php/phpinterfaces.i
@@ -54,7 +54,7 @@
#define SWIG_PHP_INTERFACE_JsonSerializable_HEADER "ext/json/php_json.h"
// New in PHP 8.0.
-#if PHP_MAJOR >= 8
+#if PHP_MAJOR_VERSION >= 8
# define SWIG_PHP_INTERFACE_Stringable_CE zend_ce_stringable
# define SWIG_PHP_INTERFACE_Stringable_HEADER "zend_interfaces.h"
#endif