Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
healerearlysessionstart.php
1<?php
2
4
8
10{
11 public function process(SessionInterface $kernelSession)
12 {
13 if (($kernelSession instanceof KernelSessionProxy) && $kernelSession->isActive() && !$kernelSession->isStarted())
14 {
15 session_write_close();
16
17 $exception = new SystemException(
18 'Attention! The session_start function was called before the Bitrix Kernel was started. ' .
19 'The session will be closed to avoid errors. It\'s strongly recommended to avoid session usage before initializing the Bitrix Kernel.'
20 );
21 trigger_error($exception->getMessage(), E_USER_DEPRECATED);
22 $application = \Bitrix\Main\Application::getInstance();
23 $exceptionHandler = $application->getExceptionHandler();
24 $exceptionHandler->writeToLog($exception);
25 }
26 }
27}