[PHP-CVS] [php-src] master: streams: embed php_stream_wrapper_log_error_internal()

[email protected] (Gina Peter Banyard)
Newsgroups php.cvs
Message-ID <[email protected]>
Author: Gina Peter Banyard (Girgias)
Date: 2026-07-17T14:33:38+01:00

Commit: https://github.com/php/php-src/commit/b06eb82fef8de522fb89dada626127c34039499c
Raw diff: https://github.com/php/php-src/commit/b06eb82fef8de522fb89dada626127c34039499c.diff

streams: embed php_stream_wrapper_log_error_internal()

As it now only has a single usage

Changed paths:
  M  main/streams/stream_errors.c


Diff:

diff --git a/main/streams/stream_errors.c b/main/streams/stream_errors.c
index c70b8f3f53b6..e7d964e999f3 100644
--- a/main/streams/stream_errors.c
+++ b/main/streams/stream_errors.c
@@ -696,30 +696,22 @@ static void php_stream_wrapper_log_store_error(zend_string *message, zend_enum_S
 	zend_llist_add_element(list, &entry);
 }
 
-static void php_stream_wrapper_log_error_internal(const php_stream_wrapper *wrapper,
+PHPAPI void php_stream_wrapper_log_error(const php_stream_wrapper *wrapper,
 		php_stream_context *context, int options, int severity, bool terminating,
-		zend_enum_StreamErrorCode code, char *param, const char *fmt, va_list args)
+		zend_enum_StreamErrorCode code, const char *fmt, ...)
 {
+	va_list args;
+	va_start(args, fmt);
 	zend_string *message = vstrpprintf(0, fmt, args);
 	const char *wrapper_name = PHP_STREAM_ERROR_WRAPPER_NAME(wrapper);
 
 	if (options & REPORT_ERRORS) {
 		php_stream_wrapper_error_internal(
-				wrapper_name, context, NULL, options, severity, terminating, code, param, message);
+				wrapper_name, context, NULL, options, severity, terminating, code, NULL, message);
 	} else {
 		php_stream_wrapper_log_store_error(
-				message, code, wrapper_name, param, severity, terminating);
+				message, code, wrapper_name, NULL, severity, terminating);
 	}
-}
-
-PHPAPI void php_stream_wrapper_log_error(const php_stream_wrapper *wrapper,
-		php_stream_context *context, int options, int severity, bool terminating,
-		zend_enum_StreamErrorCode code, const char *fmt, ...)
-{
-	va_list args;
-	va_start(args, fmt);
-	php_stream_wrapper_log_error_internal(
-			wrapper, context, options, severity, terminating, code, NULL, fmt, args);
 	va_end(args);
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.