Commit 0cec5e27 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Store.php: Typo3 stops rendering, "self::setVarArray($_SESSION[STORE_EXTRA],...

Store.php: Typo3 stops rendering, "self::setVarArray($_SESSION[STORE_EXTRA], STORE_EXTRA, true);" has been called with $_SESSION[STORE_EXTRA]=NULL - additional check implemented to detect this.
parent c239839c
......@@ -375,11 +375,18 @@ class Store {
* @throws \qfq\CodeException
*/
private static function fillStoreExtra() {
$value = Session::get(STORE_EXTRA);
if ($value === false)
if (!isset($_SESSION[STORE_EXTRA]) || $_SESSION[STORE_EXTRA] === null) {
$value = false;
}
if ($value === false) {
self::setVarArray(array(), STORE_EXTRA, true);
else
} else {
self::setVarArray($_SESSION[STORE_EXTRA], STORE_EXTRA, true);
}
}
/**
......@@ -464,14 +471,17 @@ class Store {
// The STORE_EXTRA saves arrays and is persistent
if ($store === STORE_EXTRA) {
$store = Session::get(STORE_EXTRA);
if ($store === false)
if ($store === false) {
$store = array();
}
$store[$key] = $value;
Session::set(STORE_EXTRA, $store);
}
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment