From d51eb1d74ce75b0b77dd444a7fb83edace917651 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 21 Feb 2023 11:06:12 +0100 Subject: [PATCH 1/2] Zend/zend_ini: fix zend_result return values The value "1" was illegal. Signed-off-by: George Peter Banyard --- Zend/zend_ini.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Zend/zend_ini.c b/Zend/zend_ini.c index baef011023c..1b4710eb503 100644 --- a/Zend/zend_ini.c +++ b/Zend/zend_ini.c @@ -57,7 +57,7 @@ static zend_result zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stag } if (stage == ZEND_INI_STAGE_RUNTIME && result == FAILURE) { /* runtime failure is OK */ - return 1; + return FAILURE; } if (ini_entry->value != ini_entry->orig_value) { zend_string_release(ini_entry->value); @@ -68,7 +68,7 @@ static zend_result zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stag ini_entry->orig_value = NULL; ini_entry->orig_modifiable = 0; } - return 0; + return SUCCESS; } /* }}} */ From ed4dc39e7fb8cf7e343aa6f654314e753a6107f0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 21 Feb 2023 11:06:48 +0100 Subject: [PATCH 2/2] ext/curl/interface: fix zend_result return value Closes GH-10640 Signed-off-by: George Peter Banyard --- ext/curl/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 36300dacfcf..7eb081700c2 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2051,7 +2051,7 @@ static inline int build_mime_structure_from_hash(php_curl *ch, zval *zpostfields postval = Z_STR_P(prop); if (php_check_open_basedir(ZSTR_VAL(postval))) { - return 1; + return FAILURE; } prop = zend_read_property(curl_CURLFile_class, Z_OBJ_P(current), "mime", sizeof("mime")-1, 0, &rv);