From 67a19cf48b775499364cf10f99319ef585039890 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Fri, 23 Apr 2010 05:21:19 +0000 Subject: #688294 by Berdir, andypost, Crell, catch: Fixed Switch from db_is_active() to proper exception catching. --- includes/authorize.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'includes/authorize.inc') diff --git a/includes/authorize.inc b/includes/authorize.inc index 39a7125e6..8ae771a5d 100644 --- a/includes/authorize.inc +++ b/includes/authorize.inc @@ -159,7 +159,7 @@ function authorize_filetransfer_form_submit($form, &$form_state) { // to make sure it is available since this code could potentially (will // likely) be called during the installation process, before the // database is set up. - if (db_is_active()) { + try { $connection_settings = array(); foreach ($form_state['values']['connection_settings'][$filetransfer_backend] as $key => $value) { // We do *not* want to store passwords in the database, unless the @@ -186,6 +186,11 @@ function authorize_filetransfer_form_submit($form, &$form_state) { // Now run the operation. authorize_run_operation($filetransfer); } + catch (Exception $e) { + // If there is no database available, we don't care and just skip + // this part entirely. + } + break; case 'enter_connection_settings': -- cgit v1.2.3