+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
*/
/**
* (optional) Code with which to exit.
*/
public static function civiExit($status = 0) {
+
+ if ($status > 0) {
+ http_response_code(500);
+ }
// move things to CiviCRM cache as needed
CRM_Core_Session::storeSessionObjects();
$localDrivers = ['CRM_Utils_Cache_Arraycache', 'CRM_Utils_Cache_NoCache'];
if (Civi\Core\Container::isContainerBooted()
&& !in_array(get_class(CRM_Utils_Cache::singleton()), $localDrivers)) {
+ Civi::cache('long')->flush();
Civi::cache('settings')->flush();
Civi::cache('js_strings')->flush();
Civi::cache('community_messages')->flush();
$params = array();
}
$config = CRM_Core_Config::singleton();
- return $config->userSystem->loadBootStrap($params, $loadUser, $throwError, $realPath);
+ $result = $config->userSystem->loadBootStrap($params, $loadUser, $throwError, $realPath);
+ if (is_callable([$config->userSystem, 'setMySQLTimeZone'])) {
+ $config->userSystem->setMySQLTimeZone();
+ }
+ return $result;
}
/**