From: Chris Burgess Date: Fri, 7 Jun 2013 02:14:54 +0000 (+1200) Subject: Issue CRM-12775. If we are in CLI, do not fail for lack of ability to insert to HTML... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=70ec93e4af025fb2935f6f8594508936b5d0f817;p=civicrm-core.git Issue CRM-12775. If we are in CLI, do not fail for lack of ability to insert to HTML HEAD. --- diff --git a/CRM/Upgrade/Incremental/php/FourThree.php b/CRM/Upgrade/Incremental/php/FourThree.php index de3a5d37a4..e6469cff87 100644 --- a/CRM/Upgrade/Incremental/php/FourThree.php +++ b/CRM/Upgrade/Incremental/php/FourThree.php @@ -63,14 +63,14 @@ class CRM_Upgrade_Incremental_php_FourThree { } } if ($rev == '4.3.beta4' && CRM_Utils_Constant::value('CIVICRM_UF', FALSE) == 'Drupal6') { - // CRM-11823 - Make sure the D6 HTML HEAD technique will work on upgrade pages - theme('item_list', array()); // force-load theme registry - $theme_registry = theme_get_registry(); - if ( - !isset($theme_registry['page']['preprocess functions']) || - FALSE === array_search('civicrm_preprocess_page_inject', $theme_registry['page']['preprocess functions']) - ) { - CRM_Core_Error::fatal('Please reset the Drupal cache (Administer => Site Configuration => Performance => Clear cached data))'); + // CRM-11823 - Make sure the D6 HTML HEAD technique will work on + // upgrade pages ... except when we're in Drush. + if (!function_exists('drush_main')) { + theme('item_list', array()); // force-load theme registry + $theme_registry = theme_get_registry(); + if (!isset($theme_registry['page']['preprocess functions']) || FALSE === array_search('civicrm_preprocess_page_inject', $theme_registry['page']['preprocess functions'])) { + CRM_Core_Error::fatal('Please reset the Drupal cache (Administer => Site Configuration => Performance => Clear cached data))'); + } } } }