mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 09:14:58 +02:00
Fix issue processwire/processwire-issues#712 to correct issue with $config->sessionHistory=1; setting not working correctly
This commit is contained in:
@@ -1199,7 +1199,13 @@ class Session extends Wire implements \IteratorAggregate {
|
||||
end($history);
|
||||
$lastKey = key($history);
|
||||
$nextKey = $lastKey+1;
|
||||
if($cnt >= $historyCnt) $history = array_slice($history, -1 * ($historyCnt-1), null, true);
|
||||
if($cnt >= $historyCnt) {
|
||||
if($historyCnt > 1) {
|
||||
$history = array_slice($history, -1 * ($historyCnt - 1), null, true);
|
||||
} else {
|
||||
$history = array();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$nextKey = 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user