From 806b2c999e7f401da59e6827ed81ab37ba22a232 Mon Sep 17 00:00:00 2001 From: Artur Kyryliuk Date: Thu, 19 Mar 2026 12:33:51 +0100 Subject: [PATCH] [FIX] Deprecation warnings of 8.4. --- core/src/Controllers/Resources.php | 2 +- core/src/Mail.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/Controllers/Resources.php b/core/src/Controllers/Resources.php index 7110e3b85e..3fd8d78bb8 100644 --- a/core/src/Controllers/Resources.php +++ b/core/src/Controllers/Resources.php @@ -48,7 +48,7 @@ public function getParameters(array $params = []) : array return array_merge(compact('tabs'), parent::getParameters($params), compact('activeTab')); } - protected function makeTab($tabClass, int $index = null) :? ManagerTheme\TabControllerInterface + protected function makeTab($tabClass, ?int $index = null) :? ManagerTheme\TabControllerInterface { $tabController = null; if (class_exists($tabClass) && diff --git a/core/src/Mail.php b/core/src/Mail.php index af3f8dafea..30e933e153 100644 --- a/core/src/Mail.php +++ b/core/src/Mail.php @@ -46,7 +46,11 @@ public function init($modx = null) if ($modx['config']->has('cms.settings.smtppw')) { $this->Password = $modx['config']->get('cms.settings.smtppw'); } else { - $this->Password = $modx->getConfig('smtppw'); + $this->Password = $modx->getConfig('smtppw') ?? ''; + /** + * @todo [remove@3.7] Remove in Evolution CMS 3.7 + * @deprecated + **/ if (10 < strlen($this->Password)) { $this->Password = substr($this->Password, 0, -7); $this->Password = str_replace('%', '=', $this->Password);