--- PHP_5_3/main/streams/streams.c 2011/07/05 14:12:01 312936 +++ PHP_5_3/main/streams/streams.c 2011/07/05 16:09:06 312937 @@ -154,6 +154,7 @@ char *tmp = estrdup(path); char *msg; int free_msg = 0; + php_stream_wrapper orig_wrapper; if (wrapper) { if (wrapper->err_count > 0) { @@ -198,7 +199,16 @@ } php_strip_url_passwd(tmp); + if (wrapper) { + /* see bug #52935 */ + orig_wrapper = *wrapper; + wrapper->err_stack = NULL; + wrapper->err_count = 0; + } php_error_docref1(NULL TSRMLS_CC, tmp, E_WARNING, "%s: %s", caption, msg); + if (wrapper) { + *wrapper = orig_wrapper; + } efree(tmp); if (free_msg) { efree(msg);