http://api.drupal.org/api/function/drupal_http_request/7

if (!$fp) {
  ...
  variable_set('drupal_http_request_fails', TRUE);

if drupal_http_request is called before the database is installed, variable_set will make a Fatal error..

Comments

Damien Tournoud’s picture

Not nice, but what could you do about it? ;)

Pasqualle’s picture

can we check the db?

David_Rothstein’s picture

One option is to get rid of the whole 'drupal_http_request_fails' thing altogether -- it is causing enough other troubles as it is.

See #245990-124: HTTP request testing unreliable and may be undesirable.

Gábor Hojtsy’s picture

Sutharsan’s picture

For info: This now fixed for Drupal 8. See #965078-58: HTTP request checking is unreliable and should be removed in favor of watchdog() calls. Needs work for backport to D7.

Pasqualle’s picture

Pasqualle’s picture