From eb3277f93ef3edd0862dd81b5c6bb50914fa95d1 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Fri, 23 Feb 2018 12:00:11 +0530 Subject: [PATCH] CRM-21795 - Avoid fatal error to be displayed in log files. --- CRM/Utils/System/Drupal.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CRM/Utils/System/Drupal.php b/CRM/Utils/System/Drupal.php index 6a4d669999..b495921210 100644 --- a/CRM/Utils/System/Drupal.php +++ b/CRM/Utils/System/Drupal.php @@ -853,10 +853,12 @@ AND u.status = 1 * Similar to drupal_exit(). */ public function onCiviExit() { - if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') { - module_invoke_all('exit'); + if (function_exists('module_invoke_all')) { + if (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update') { + module_invoke_all('exit'); + } + drupal_session_commit(); } - drupal_session_commit(); } } -- 2.25.1