[php-src] master: standard/file.c: use normal docref function for E_WARNINGs in popen() (#22746)
Gina Peter Banyard via GitHub <[email protected]>
| Newsgroups | gmane.comp.php.cvs.general |
|---|---|
| Message-ID | <[email protected]> |
Author: Gina Peter Banyard (Girgias)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-07-15T16:50:46+01:00
Commit: https://github.com/php/php-src/commit/7f4960657c184f1e280bc4e5b6f38e112c83f1ea
Raw diff: https://github.com/php/php-src/commit/7f4960657c184f1e280bc4e5b6f38e112c83f1ea.diff
standard/file.c: use normal docref function for E_WARNINGs in popen() (#22746)
Now that arguments in warnings can be configured to always appear it is no longer necessary to use `php_error_docref2()`.
Changed paths:
M ext/standard/file.c
Diff:
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 0bb00355744f..fd6f578e4ef0 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -822,7 +822,7 @@ PHP_FUNCTION(popen)
fp = VCWD_POPEN(command, posix_mode);
if (!fp) {
- php_error_docref2(NULL, command, posix_mode, E_WARNING, "%s", strerror(errno));
+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
efree(posix_mode);
RETURN_FALSE;
}
@@ -831,7 +831,7 @@ PHP_FUNCTION(popen)
stream = php_stream_fopen_from_pipe(fp, mode);
if (stream == NULL) {
- php_error_docref2(NULL, command, mode, E_WARNING, "%s", strerror(errno));
+ php_error_docref(NULL, E_WARNING, "%s", strerror(errno));
RETVAL_FALSE;
} else {
php_stream_to_zval(stream, return_value);