X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUpgrade%2FHeadless.php;h=a63c15ba7ff14cc27673947affea6796c2f5a527;hb=daaca8f90dcbfb4d7e8a80a01e83750f850fb197;hp=e5815d5705edb566ddfb98a5fefd9f04297a92d4;hpb=d44a51e500618f1d9abfad4cc6de65cf20226c10;p=civicrm-core.git diff --git a/CRM/Upgrade/Headless.php b/CRM/Upgrade/Headless.php index e5815d5705..a63c15ba7f 100644 --- a/CRM/Upgrade/Headless.php +++ b/CRM/Upgrade/Headless.php @@ -23,7 +23,7 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** * Perform an upgrade without using the web-frontend @@ -35,7 +35,6 @@ class CRM_Upgrade_Headless { * * @param bool $enablePrint * - * @throws * @throws Exception * @return array, with keys: * - message: string, HTML-ish blob @@ -62,16 +61,16 @@ class CRM_Upgrade_Headless { $postUpgradeMessageFile = CRM_Utils_File::tempnam('civicrm-post-upgrade'); $queueRunner = new CRM_Queue_Runner(array( - 'title' => ts('CiviCRM Upgrade Tasks'), - 'queue' => CRM_Upgrade_Form::buildQueue($currentVer, $latestVer, $postUpgradeMessageFile), - )); + 'title' => ts('CiviCRM Upgrade Tasks'), + 'queue' => CRM_Upgrade_Form::buildQueue($currentVer, $latestVer, $postUpgradeMessageFile), + )); $queueResult = $queueRunner->runAll(); if ($queueResult !== TRUE) { $errorMessage = CRM_Core_Error::formatTextException($queueResult['exception']); CRM_Core_Error::debug_log_message($errorMessage); if ($enablePrint) { - print($errorMessage); - } + print ($errorMessage); + } throw $queueResult['exception']; // FIXME test } @@ -82,4 +81,5 @@ class CRM_Upgrade_Headless { 'message' => file_get_contents($postUpgradeMessageFile), ); } + }