]> granicus.if.org Git - php/commitdiff
MFH: Fixed potentially confusing error message on failure when no errors are logged
authorJani Taskinen <jani@php.net>
Tue, 15 Jul 2008 16:10:32 +0000 (16:10 +0000)
committerJani Taskinen <jani@php.net>
Tue, 15 Jul 2008 16:10:32 +0000 (16:10 +0000)
main/streams/streams.c

index 0e3db116926baeee8b0d02c2e409c43b04815361..7349bb14800d6fec864418a68a42c81c4e346032 100755 (executable)
@@ -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";