[php-src] master: standard/file.c: use normal docref function for E_WARNINGs in popen() (#22746)
| From: | Gina Peter Banyard via GitHub | Date: | Wed, 15 Jul 2026 15:50:49 +0000 |
| Subject: | [php-src] master: standard/file.c: use normal docref function for E_WARNINGs in popen() (#22746) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-140031@lists.php.net to get a copy of this message | ||
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);