From e6a4b82e6e40a2346fd32eb63b0f8a47bf670257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Thu, 20 Dec 2007 08:57:55 +0000 Subject: #196535 by sun, chx, dww: check whether Drupal can issue HTTP requests at all, so we know that this is the cause of problems, not the remote host not responding. --- modules/update/update.fetch.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules/update') diff --git a/modules/update/update.fetch.inc b/modules/update/update.fetch.inc index a79e71c3a..4ecdbc235 100644 --- a/modules/update/update.fetch.inc +++ b/modules/update/update.fetch.inc @@ -42,12 +42,15 @@ function _update_refresh() { if ($data) { $parser = new update_xml_parser; $available = $parser->parse($data); + } + if (!empty($available) && is_array($available)) { $frequency = variable_get('update_check_frequency', 1); cache_set('update_info', $available, 'cache_update', time() + (60 * 60 * 24 * $frequency)); variable_set('update_last_check', time()); watchdog('update', 'Fetched information about all available new releases and updates.', array(), WATCHDOG_NOTICE, l('view', 'admin/reports/updates')); } else { + module_invoke('system', 'check_http_request'); watchdog('update', 'Unable to fetch any information about available new releases and updates.', array(), WATCHDOG_ERROR, l('view', 'admin/reports/updates')); } return $available; -- cgit v1.2.3