blob: 630260e92502b1ac099f2d691d128725e06aedce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From 010fef7b3941cdd24ceaaac78f3db9732539e0d3 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
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);
|