Skip to content

Commit

Permalink
do not break training when no cookies sent via js
Browse files Browse the repository at this point in the history
  • Loading branch information
kingschnulli committed May 12, 2020
1 parent 760e53c commit b45b82a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function track () {

$parser = new CookieParser();
$jsCookies = $parser->parseCookie($config->getRequestParameter('cookies', true));
$cookies = array_merge($_COOKIE, $jsCookies['cookies']);
$cookies = is_array($jsCookies['cookies']) ? array_merge($_COOKIE, $jsCookies['cookies']) : $_COOKIE;

$apiCookies = array_diff(array_keys($cookies), self::ADMIN_COOKIES, self::FRONTEND_COOKIES);

Expand Down

0 comments on commit b45b82a

Please sign in to comment.