diff options
author | Greg Beaver <cellog@php.net> | 2008-04-28 22:37:31 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2008-04-28 22:37:31 +0000 |
commit | c46d651b3e008e189f351217b8084abaa3a9bda6 (patch) | |
tree | d77a19d3f94bd46aa61beabeefb7539db11b1bc6 | |
parent | f9300287516b981f56eed460f187c91168012db2 (diff) | |
download | php-git-c46d651b3e008e189f351217b8084abaa3a9bda6.tar.gz |
Fixed potentially confusing error message on failure when no errors are logged
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | main/streams/streams.c | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -136,6 +136,7 @@ PHP NEWS . Added CGI SAPI -T option which can be used to measure execution time of script repeated several times. (Dmitry) - Improved streams: + . Fixed potentially confusing error message on failure when no errors are logged (Greg) . Added stream_supports_lock() function. (Benjamin Schulz) . Added "ignore_errors" option to http fopen wrapper. (David Zulke, Sara) . Added context parameter for copy() function. (Sara) diff --git a/main/streams/streams.c b/main/streams/streams.c index 614470fc7b..3a40e33267 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -164,7 +164,11 @@ void php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char * free_msg = 1; } else { - msg = strerror(errno); + if (wrapper == &php_plain_files_wrapper) { + msg = strerror(errno); + } else { + msg = "operation failed"; + } } } else { msg = "no suitable wrapper could be found"; |