[php] Fix zend_class_implements_interface() compat
The sense of parameter 3 of instanceof_function_ex() appears to have changed in PHP 7.4 and we need to pass 0 for older versions and 1 for PHP 7.4. Words fail me.
This commit is contained in:
parent
4d3d4839b0
commit
ce4a9923ed
1 changed files with 6 additions and 1 deletions
|
|
@ -96,7 +96,12 @@ static int default_error_code = E_ERROR;
|
|||
static zend_class_entry SWIG_Php_swig_wrapped_interface_ce;
|
||||
|
||||
#if PHP_MAJOR_VERSION == 7
|
||||
# define zend_class_implements_interface(C, I) instanceof_function_ex(C, I, 1)
|
||||
/* The sense of parameter 3 of instanceof_function_ex() changed in PHP 7.4!
|
||||
# if PHP_MINOR <= 3
|
||||
# define zend_class_implements_interface(C, I) instanceof_function_ex(C, I, 0)
|
||||
# else
|
||||
# define zend_class_implements_interface(C, I) instanceof_function_ex(C, I, 1)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* used to wrap returned objects in so we know whether they are newobject
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue