Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When trying to get a domain name that doesn't exist, or some sort of problem with the lookup such as below, there is no error response.
$urls = array(
'http://somethingnonexistant.com/',
);
drupal_http_request returns the following error result:
stdClass Object
(
[code] => 0
[error] => php_network_getaddresses: getaddrinfo failed: Name or service not known
)
Comment | File | Size | Author |
---|---|---|---|
#3 | httprl-1336086-3.patch | 2.71 KB | mikeytown2 |
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedYep, it is a bug. If you need this NOW, you can check the return value of httprl_request() as that should contain the error.
Comment #2
modstore CreditAttribution: modstore commentedIt's ok, I have added a workaround for now.
I can't check the return value, caus I send it 50 urls for example, and 4 might fail, and I need to know the ones that do. Currently for a workaround, I have my own lookup so I know which urls aren't returned.
Cheers.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedThis patch has been committed.