]> granicus.if.org Git - php/commitdiff
MFH: http/ignore_errors context option
authorSara Golemon <pollita@php.net>
Mon, 5 Nov 2007 01:00:43 +0000 (01:00 +0000)
committerSara Golemon <pollita@php.net>
Mon, 5 Nov 2007 01:00:43 +0000 (01:00 +0000)
NEWS
ext/standard/http_fopen_wrapper.c

diff --git a/NEWS b/NEWS
index 582ab68364f79673b01591f4704b96fadb4663ab..9005f6cced77ff2c06e19eb3eca02ba265814893 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ PHP                                                                        NEWS
   (Etienne Kneuss)
 - Added "compact" handler for Zend MM storage. (Dmitry)
 - Added '+' and '*' specifiers to zend_parse_parameters(). (Andrei)
+- Added 'ignore_errors' option to http fopen wrapper. (David Zulke, Sara)
 
 - Upgraded PCRE to version 7.4 (Nuno)
 
index f3acdb29819823b648c010d998c824f348dfb3c6..5ab7459700ec619eddfeedd9910ccd5978ee6322 100644 (file)
@@ -501,7 +501,8 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
                                response_code = 0;
                        }
                        /* when we request only the header, don't fail even on error codes */
-                       if (options & STREAM_ONLY_GET_HEADERS) {
+                       if ((options & STREAM_ONLY_GET_HEADERS) ||
+                               (php_stream_context_get_option(context, "http", "ignore_errors",  &tmpzval) == SUCCESS && zend_is_true(*tmpzval)) ) {
                                reqok = 1;
                        }
                        switch(response_code) {