From 89adc07d54908e6ce00978123a4390c999db0564 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 24 Aug 2020 11:50:38 +0200 Subject: add patches for PHP 8 from upstream and from https://github.com/jbboehr/php-psr/pull/77 --- 77.patch | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 77.patch (limited to '77.patch') diff --git a/77.patch b/77.patch new file mode 100644 index 0000000..6426b71 --- /dev/null +++ b/77.patch @@ -0,0 +1,33 @@ +From 497db8e1d8a6da4d1005bba07d76de994ae7a82d Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 24 Aug 2020 11:43:47 +0200 +Subject: [PATCH] fix for upcoming PHP 8 + +--- + psr_log.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/psr_log.c b/psr_log.c +index 182da66..17b3246 100644 +--- a/psr_log.c ++++ b/psr_log.c +@@ -101,7 +101,6 @@ static void php_psr_PsrLogAbstractLogger_log(const char * level_str, size_t leve + zval * _this_zval = getThis(); + zval * message; + zval * context = NULL; +- zend_class_entry * expected_ce = NULL; // PsrLogAbstractLogger_ce_ptr + zval fname = {0}; + zval fparams[3]; + +@@ -252,7 +251,11 @@ PHP_METHOD(PsrLogLoggerAwareTrait, setLogger) + Z_PARAM_OBJECT_OF_CLASS(logger, PsrLogLoggerInterface_ce_ptr) + ZEND_PARSE_PARAMETERS_END(); + ++#if PHP_VERSION_ID < 80000 + zend_update_property(Z_OBJCE_P(_this_zval), _this_zval, "logger", sizeof("logger")-1, logger); ++#else ++ zend_update_property(Z_OBJCE_P(_this_zval), Z_OBJ_P(_this_zval), "logger", sizeof("logger")-1, logger); ++#endif + } + + static zend_function_entry PsrLogLoggerAwareTrait_methods[] = { -- cgit