diff options
-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"; |