1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
healerearlysessionstart.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main\Session\Legacy
;
4
5
use
Bitrix\Main\Session\KernelSessionProxy
;
6
use
Bitrix\Main\Session\SessionInterface
;
7
use
Bitrix\Main\SystemException
;
8
9
final
class
HealerEarlySessionStart
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
}
Bitrix\Main\Application\getInstance
static getInstance()
Определения
application.php:98
Bitrix\Main\Session\KernelSessionProxy
Определения
kernelsessionproxy.php:6
Bitrix\Main\Session\Legacy\HealerEarlySessionStart
Определения
healerearlysessionstart.php:10
Bitrix\Main\Session\Legacy\HealerEarlySessionStart\process
process(SessionInterface $kernelSession)
Определения
healerearlysessionstart.php:11
Bitrix\Main\SystemException
Определения
SystemException.php:9
Bitrix\Main\Session\SessionInterface
Определения
sessioninterface.php:6
$application
$application
Определения
bitrix.php:23
$kernelSession
$kernelSession
Определения
include.php:181
Bitrix\Main\Session\Legacy
Определения
healerearlysessionstart.php:3
bitrix
modules
main
lib
session
legacy
healerearlysessionstart.php
Создано системой
1.14.0