- fix SEGV on un/serializing HttpRequests
[m6w6/ext-http] / http_date_api.c
index 10f3463a437c8efd2ab5cee7636f8c22ba2815f9..32efdfb8bc6b706c6af6c480d4dda2100c0a2fe1 100644 (file)
@@ -159,7 +159,7 @@ PHP_HTTP_API char *_http_date(time_t t TSRMLS_DC)
 /* }}} */
 
 /* {{{ time_t http_parse_date(char *) */
-PHP_HTTP_API time_t _http_parse_date(const char *date TSRMLS_DC)
+PHP_HTTP_API time_t _http_parse_date_ex(const char *date, zend_bool silent TSRMLS_DC)
 {
        time_t t = -1;
        
@@ -180,7 +180,7 @@ PHP_HTTP_API time_t _http_parse_date(const char *date TSRMLS_DC)
        putenv(tzput);
 #endif
 
-       if (-1 == t) {
+       if (-1 == t && !silent) {
                http_error_ex(HE_NOTICE, HTTP_E_RUNTIME, "Could not parse date: %s", date);
        }