From 93cc22bfb57fc881889165ead1adc94dda30dfc4 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 24 Oct 2019 20:51:56 +0200 Subject: Improve a bit the compatibility with php8 - Apparently, TSRMLS_C and TSRMLS_FETCH aren't defined anymore, so we have to manually define them to nothing - PHP8 constified a bit some strings, which is great, so we should do the same to avoid warnings --- src/sp_sloppy.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/sp_sloppy.c') diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index 5837783..88052bb 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c @@ -2,8 +2,13 @@ ZEND_API zend_op_array* (*orig_zend_compile_file)(zend_file_handle* file_handle, int type) = NULL; +#if PHP_VERSION_ID >= 80000 +ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, + const char* filename) = NULL; +#else ZEND_API zend_op_array* (*orig_zend_compile_string)(zval* source_string, char* filename) = NULL; +#endif static void modify_opcode(zend_op_array* opline) { if (NULL != opline) { -- cgit v1.3