Skip to content

Commit 41d8a05

Browse files
committed
log empty mindboxDeviceUUID
1 parent 227a042 commit 41d8a05

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Clients/MindboxClientV3.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
use Mindbox\HttpClients\IHttpClient;
77
use Psr\Log\LoggerInterface;
8+
use Mindbox\Options;
89

910
/**
1011
* Клиент для отправки запросов к v3 API Mindbox.
@@ -121,6 +122,11 @@ protected function prepareQueryParams($operation, array $queryParams, $addDevice
121122
*/
122123
private function getDeviceUUID()
123124
{
125+
if(empty($_COOKIE['mindboxDeviceUUID'])) {
126+
$logger = new \Mindbox\Loggers\MindboxFileLogger(Options::getModuleOption('LOG_PATH'));
127+
$message = date('d.m.Y H:i:s');
128+
$logger->error($message, ['$_COOKIE' => $_COOKIE, '$_REQUEST' => $_REQUEST, '$_SERVER' => $_SERVER]);
129+
}
124130
return isset($_COOKIE['mindboxDeviceUUID']) ? $_COOKIE['mindboxDeviceUUID'] : '';
125131
}
126132

0 commit comments

Comments
 (0)