From: Sara Golemon Date: Mon, 5 Nov 2007 00:47:21 +0000 (+0000) Subject: Allow http fopen wrapper to fetch content on 'error' condition (David Zulke) X-Git-Tag: RELEASE_2_0_0a1~1478 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1d31117493a4094263420f8840469daf2a9420f;p=php Allow http fopen wrapper to fetch content on 'error' condition (David Zulke) --- diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index fa7bc97fa3..849eb99ebf 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -544,7 +544,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) {