- php_error_docref(NULL, E_WARNING,
- "Failed to parse port; unexpected byte 0x%02x at pos %u in '%s'",
- (unsigned char) *ptr, (unsigned) (ptr - tmp), tmp);
- return FAILURE;
- } else if (!(mb = parse_mb(state, PARSE_HOSTINFO, ptr, end, tmp, 0))) {
- return FAILURE;
+ if (!(state->flags & PHP_HTTP_URL_SILENT_ERRORS)) {
+ php_error_docref(NULL, E_WARNING,
+ "Failed to parse port; unexpected byte 0x%02x at pos %u in '%s'",
+ (unsigned char) *ptr, (unsigned) (ptr - tmp), tmp);
+ }
+ if (!(state->flags & PHP_HTTP_URL_IGNORE_ERRORS)) {
+ return FAILURE;
+ }
+ break;
+ } else if (!(mb = parse_mb(state, PARSE_HOSTINFO, ptr, end, tmp, state->flags & PHP_HTTP_URL_SILENT_ERRORS))) {
+ if (!(state->flags & PHP_HTTP_URL_IGNORE_ERRORS)) {
+ return FAILURE;
+ }
+ break;