Hi, If a stream wrapper does not log errors, by default, we grab strerror(errno) to figure out the error message, but this is not a good idea for any wrapper but plain_wrapper for the obvious reason that errno is not used by wrappers that don't use sys calls.
Is this patch against 5.3 acceptable (I'll merge to HEAD on commit if so)? Greg
Index: main/streams/streams.c =================================================================== RCS file: /repository/php-src/main/streams/streams.c,v retrieving revision 1.82.2.6.2.18.2.7 diff -u -r1.82.2.6.2.18.2.7 streams.c --- main/streams/streams.c 27 Mar 2008 10:33:40 -0000 1.82.2.6.2.18.2.7 +++ main/streams/streams.c 13 Apr 2008 20:41:23 -0000 @@ -164,7 +164,11 @@ 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";
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php