From 2c61529e0405414538f7f73b8bff448735b0f48f 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. --- 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 baef011023c8..1b4710eb503a 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 1d77347129d5ff76bf576e1c9da90842d0eaa342 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 --- 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 36300dacfcfb..7eb081700c2e 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);