From: Antony Dovgal Date: Mon, 18 Dec 2006 14:56:20 +0000 (+0000) Subject: MFH: fix #39850 (SplFileObject throws contradictory/wrong error messages when trying... X-Git-Tag: php-5.2.1RC2~167 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a726dcaa99fb4417b1aeab08b630535d3f4024ac;p=php MFH: fix #39850 (SplFileObject throws contradictory/wrong error messages when trying to open "php://wrong") --- diff --git a/NEWS b/NEWS index 9d8f849c60..0621dab911 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS . cookies . canary protection (debug build only) . random generation of cookies and canaries +- Fixed bug #39850 (SplFileObject throws contradictory/wrong error messages + when trying to open "php://wrong"). (Tony) - Fixed bug #39832 (SOAP Server: parameter not matching the WSDL specified type are set to 0). (Dmitry) diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 200ec5f2db..e533f5535e 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -276,6 +276,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, ch return stream; } else { /* invalid php://thingy */ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid php:// URL specified"); return NULL; }