Версия Opencart: 3.0.3.8-ce.1.4
Версия PHP: 8.1
В режиме: maintenance_mode (Режим обслуживания)
Вылезает ошибка:
Unknown: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in D:\LocalServer\home\site.loc\storage\modification\system\engine\action.php on line 65
На PHP 7.4 - ошибки нет.
UPD: В итоге, в файле system/engine/action.php добавил защиту от null и нестроковых значений:
Заменил
$this->id = $route;
На
$this->id = $route ?? '';
Заменил
$parts = explode('/', preg_replace('/[^a-zA-Z0-9_\/]/', '', (string)$route));
На
$route = (string)($route ?? '');
$parts = explode('/', preg_replace('/[^a-zA-Z0-9_\/]/', '', $route));
Заменил
$class = 'Controller' . preg_replace('/[^a-zA-Z0-9]/', '', $this->route);
На
$class = 'Controller' . preg_replace('/[^a-zA-Z0-9]/', '', (string)$this->route);