diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-20 08:57:55 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-12-20 08:57:55 +0000 |
commit | e6a4b82e6e40a2346fd32eb63b0f8a47bf670257 (patch) | |
tree | 5de568c32cd176bbaffe58a7809ae76bf421c6f3 /modules/update | |
parent | d8bd6cf97c7afce67b0b99817ccc139c65bc1c63 (diff) | |
download | brdo-e6a4b82e6e40a2346fd32eb63b0f8a47bf670257.tar.gz brdo-e6a4b82e6e40a2346fd32eb63b0f8a47bf670257.tar.bz2 |
#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.
Diffstat (limited to 'modules/update')
-rw-r--r-- | modules/update/update.fetch.inc | 3 |
1 files changed, 3 insertions, 0 deletions
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; |