[php-src] master: streams: remove param field of php_stream_error_entry

From: Date: Mon, 20 Jul 2026 19:50:19 +0000
Subject: [php-src] master: streams: remove param field of php_stream_error_entry
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-140141@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-07-20T20:50:13+01:00 Commit: https://github.com/php/php-src/commit/0cf29ab0589cd9ab3b6d3d3972e2222e57eced3f Raw diff: https://github.com/php/php-src/commit/0cf29ab0589cd9ab3b6d3d3972e2222e57eced3f.diff streams: remove param field of php_stream_error_entry It is always assigned NULL Changed paths: M main/streams/php_stream_errors.h M main/streams/stream_errors.c Diff: diff --git a/main/streams/php_stream_errors.h b/main/streams/php_stream_errors.h index b21f47505248..67112c8932b7 100644 --- a/main/streams/php_stream_errors.h +++ b/main/streams/php_stream_errors.h @@ -73,7 +73,6 @@ typedef struct _php_stream_error_entry { zend_string *message; zend_enum_StreamErrorCode code; char *wrapper_name; - char *param; char *docref; int severity; bool terminating; diff --git a/main/streams/stream_errors.c b/main/streams/stream_errors.c index b7663fe56f5d..5cb4d3df4026 100644 --- a/main/streams/stream_errors.c +++ b/main/streams/stream_errors.c @@ -67,12 +67,8 @@ static void php_stream_error_create_object(zval *zv, php_stream_error_entry *ent zend_update_property_bool( php_ce_stream_error, Z_OBJ_P(zv), ZEND_STRL("terminating"), entry->terminating); - if (entry->param) { - zend_update_property_string( - php_ce_stream_error, Z_OBJ_P(zv), ZEND_STRL("param"), entry->param); - } else { - zend_update_property_null(php_ce_stream_error, Z_OBJ_P(zv), ZEND_STRL("param")); - } + /* TODO: Remove property */ + zend_update_property_null(php_ce_stream_error, Z_OBJ_P(zv), ZEND_STRL("param")); } /* Create array of StreamError objects from error chain */ @@ -213,7 +209,6 @@ static void php_stream_error_entry_free(php_stream_error_entry *entry) php_stream_error_entry *next = entry->next; zend_string_release(entry->message); efree(entry->wrapper_name); - efree(entry->param); efree(entry->docref); efree(entry); entry = next; @@ -335,7 +330,6 @@ static void php_stream_error_add(zend_enum_StreamErrorCode code, const char *wra entry->message = message; entry->code = code; entry->wrapper_name = wrapper_name ? estrdup(wrapper_name) : NULL; - entry->param = NULL; entry->docref = docref ? estrdup(docref) : NULL; entry->severity = severity; entry->terminating = terminating; @@ -399,15 +393,9 @@ static void php_stream_report_errors(php_stream_context *context, php_stream_err { switch (error_mode) { case PHP_STREAM_ERROR_MODE_ERROR: { - php_stream_error_entry *entry = op->first_error; + const php_stream_error_entry *entry = op->first_error; while (entry) { - if (entry->param) { - php_error_docref1(entry->docref, entry->param, entry->severity, "%s", - ZSTR_VAL(entry->message)); - } else { - php_error_docref( - entry->docref, entry->severity, "%s", ZSTR_VAL(entry->message)); - } + php_error_docref(entry->docref, entry->severity, "%s", ZSTR_VAL(entry->message)); entry = entry->next; } break; @@ -652,7 +640,6 @@ static void php_stream_error_entry_dtor_legacy(void *error) php_stream_error_entry *entry = *(php_stream_error_entry **) error; zend_string_release(entry->message); efree(entry->wrapper_name); - efree(entry->param); efree(entry->docref); efree(entry); } @@ -671,7 +658,6 @@ static void php_stream_wrapper_log_store_error(zend_string *message, zend_enum_S entry->message = message; entry->code = code; entry->wrapper_name = wrapper_name ? estrdup(wrapper_name) : NULL; - entry->param = NULL; entry->severity = severity; entry->terminating = terminating;

« previous php.cvs (#140141) next »