Skip to content

Commit faa9dc0

Browse files
committed
check for Guest validity in hookActionAuthentication
1 parent a171d63 commit faa9dc0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

statsdata.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ public function hookActionAuthentication($params)
157157
{
158158
// Update or merge the guest with the customer id (login and account creation)
159159
$guest = new Guest($params['cookie']->id_guest);
160+
//Sometimes the id_guest in the cookie is empty / invalid or old here (it has been deleted already), so we should interrupt here in that case
161+
if (!Validate::isLoadedObject($guest)){
162+
return;
163+
}
160164
$result = Db::getInstance()->getRow('
161165
SELECT `id_guest`
162166
FROM `' . _DB_PREFIX_ . 'guest`

0 commit comments

Comments
 (0)