From f374170468aa4d17a6f6c1b3361ac9348d8b090c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 27 Jun 2018 14:10:50 +0200 Subject: add patch for PHP 7.3 from https://github.com/indexdata/phpyaz/pull/7 --- 7.patch | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 7.patch (limited to '7.patch') diff --git a/7.patch b/7.patch new file mode 100644 index 0000000..630260e --- /dev/null +++ b/7.patch @@ -0,0 +1,36 @@ +From 010fef7b3941cdd24ceaaac78f3db9732539e0d3 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Wed, 27 Jun 2018 13:57:51 +0200 +Subject: [PATCH] fix for PHP 7.3 API changes, and array_init always succeeds + +--- + php_yaz.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/php_yaz.c b/php_yaz.c +index 5a4ba0b..e0d5f6d 100644 +--- a/php_yaz.c ++++ b/php_yaz.c +@@ -832,8 +832,8 @@ PHP_FUNCTION(yaz_hits) + } else { + WRONG_PARAM_COUNT; + } +- if (searchresult && array_init(searchresult) == FAILURE) { +- RETURN_FALSE; ++ if (searchresult) { ++ array_init(searchresult); + } + get_assoc(INTERNAL_FUNCTION_PARAM_PASSTHRU, id, &p); + +@@ -1923,9 +1923,8 @@ PHP_FUNCTION(yaz_scan_result) + } + + array_init(return_value); +- +- if (pval_opt && array_init(pval_opt) == FAILURE) { +- RETURN_FALSE; ++ if (pval_opt) { ++ array_init(pval_opt); + } + + get_assoc(INTERNAL_FUNCTION_PARAM_PASSTHRU, pval_id, &p); -- cgit