cellog Mon Apr 28 22:37:31 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src NEWS
/php-src/main/streams streams.c
Log:
Fixed potentially confusing error message on failure when no errors are logged
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.164&r2=1.2027.2.547.2.965.2.165&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.164
php-src/NEWS:1.2027.2.547.2.965.2.165
--- php-src/NEWS:1.2027.2.547.2.965.2.164 Sun Apr 27 19:14:15 2008
+++ php-src/NEWS Mon Apr 28 22:37:31 2008
@@ -136,6 +136,7 @@
. 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)
http://cvs.php.net/viewvc.cgi/php-src/main/streams/streams.c?r1=1.82.2.6.2.18.2.7&r2=1.82.2.6.2.18.2.8&diff_format=u
Index: php-src/main/streams/streams.c
diff -u php-src/main/streams/streams.c:1.82.2.6.2.18.2.7
php-src/main/streams/streams.c:1.82.2.6.2.18.2.8
--- php-src/main/streams/streams.c:1.82.2.6.2.18.2.7 Thu Mar 27 10:33:40 2008
+++ php-src/main/streams/streams.c Mon Apr 28 22:37:31 2008
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.82.2.6.2.18.2.7 2008/03/27 10:33:40 dmitry Exp $ */
+/* $Id: streams.c,v 1.82.2.6.2.18.2.8 2008/04/28 22:37:31 cellog Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -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 CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php