diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2011-01-02 21:29:08 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2011-01-02 21:29:08 +0000 |
commit | 514ccb85e6138588bebc96bb165711582658423c (patch) | |
tree | d9f3077d6d4145726ca61709510099ecf91f16e2 /modules/update | |
parent | 7264290ea8117a9b65d181e55b7d36658c04ecbb (diff) | |
download | brdo-514ccb85e6138588bebc96bb165711582658423c.tar.gz brdo-514ccb85e6138588bebc96bb165711582658423c.tar.bz2 |
#1012822 by dww: Fixed exception handling while downloading/verifying a tarball in update manager.
Diffstat (limited to 'modules/update')
-rw-r--r-- | modules/update/update.manager.inc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/modules/update/update.manager.inc b/modules/update/update.manager.inc index 9ad0d08e0..0e699522a 100644 --- a/modules/update/update.manager.inc +++ b/modules/update/update.manager.inc @@ -580,8 +580,21 @@ function update_manager_install_form_submit($form, &$form_state) { drupal_get_updaters(); $project_location = $directory . '/' . $project; - $updater = Updater::factory($project_location); - $project_title = Updater::getProjectTitle($project_location); + try { + $updater = Updater::factory($project_location); + } + catch (Exception $e) { + form_set_error($field, $e->getMessage()); + return; + } + + try { + $project_title = Updater::getProjectTitle($project_location); + } + catch (Exception $e) { + form_set_error($field, $e->getMessage()); + return; + } if (!$project_title) { form_set_error($field, t('Unable to determine %project name.', array('%project' => $project))); |