Issue Bug Closed

#19703False initialization in TYPO3 basket function record_registration() in class.tslib_feuserauth.php

Thomas Loeffler 12/15/08, 13:19 updated 10/02/18, 12:30

Description

Using the built-in TYPO3 basket functionality with the function record_registration() in the file class.tslib_feuserauth.php on line 462, causes an fatal PHP error after following situation:

- Putting some items into the basket with “recs[table][uid]“
- Clearing the basket with “recs[clear_all]“
- Putting one item into the basket again will cause PHP error: “cannot use string offset in an array”

Change the lines:
if ($recs[‘clear_all’]) {
$this->setKey(‘ses’,‘recs’,’‘);
}

to:

if ($recs[‘clear_all’]) {
$this->setKey(‘ses’,‘recs’,array());
}

(issue imported from #M9949)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.