Commit 87278167340 for php.net
commit 87278167340dec0d65696118ac402b8783e0875c
Author: Gina Peter Banyard <girgias@php.net>
Date: Wed Dec 24 16:53:09 2025 +0100
ext/standard: use RETURN_BOOL() when possible
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index b87eacfdfda..c108900103c 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -1341,11 +1341,7 @@ PHP_FUNCTION(error_log)
Z_PARAM_STR_OR_NULL(headers)
ZEND_PARSE_PARAMETERS_END();
- if (_php_error_log((int) erropt, message, opt, headers) == FAILURE) {
- RETURN_FALSE;
- }
-
- RETURN_TRUE;
+ RETURN_BOOL(_php_error_log((int) erropt, message, opt, headers) == SUCCESS);
}
/* }}} */
@@ -2314,11 +2310,7 @@ PHP_FUNCTION(is_uploaded_file)
RETURN_FALSE;
}
- if (zend_hash_exists(SG(rfc1867_uploaded_files), path)) {
- RETURN_TRUE;
- } else {
- RETURN_FALSE;
- }
+ RETURN_BOOL(zend_hash_exists(SG(rfc1867_uploaded_files), path));
}
/* }}} */