From 60fd7d7cf2b097b1a21c772a6f1bc4bb1d52f4a9 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Mon, 26 Dec 2022 02:36:44 +0900 Subject: [PATCH] Move cacert.pem loader to autoload.php --- classes/context/Context.class.php | 4 ---- common/autoload.php | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index b7427f473..68198b31b 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -289,10 +289,6 @@ class Context exit; } - // Load certificate authorities for curl and openssl. - ini_set('curl.cainfo', RX_BASEDIR . 'vendor/composer/ca-bundle/res/cacert.pem'); - ini_set('openssl.cafile', RX_BASEDIR . 'vendor/composer/ca-bundle/res/cacert.pem'); - // Load language support. $enabled_langs = self::loadLangSelected(); $set_lang_cookie = false; diff --git a/common/autoload.php b/common/autoload.php index 42c5f3785..aeb09d98c 100644 --- a/common/autoload.php +++ b/common/autoload.php @@ -194,6 +194,12 @@ Rhymix\Framework\Debug::registerErrorHandlers(error_reporting()); $internal_timezone = Rhymix\Framework\DateTime::getTimezoneNameByOffset(config('locale.internal_timezone')); date_default_timezone_set($internal_timezone); +/** + * Set certificate authorities for curl and openssl. + */ +ini_set('curl.cainfo', RX_BASEDIR . 'vendor/composer/ca-bundle/res/cacert.pem'); +ini_set('openssl.cafile', RX_BASEDIR . 'vendor/composer/ca-bundle/res/cacert.pem'); + /** * Initialize the cache handler. */