Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge feccaeb into 7e73dc4
Browse files Browse the repository at this point in the history
  • Loading branch information
Xerkus committed Nov 28, 2017
2 parents 7e73dc4 + feccaeb commit 0995dc8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/SessionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,13 @@ public function start($preserveStorage = false)
// ArrayUtils::merge parameter
if ($oldSessionData instanceof Storage\StorageInterface) {
$oldSessionData = $oldSessionData->toArray();
} elseif ($oldSessionData instanceof \Traversable) {
} elseif ($oldSessionData instanceof Traversable) {
$oldSessionData = iterator_to_array($oldSessionData);
}
}

session_start();

if ($oldSessionData instanceof Traversable) {
$oldSessionData = $oldSessionData->toArray();
}

if (! empty($oldSessionData) && is_array($oldSessionData)) {
$_SESSION = ArrayUtils::merge($oldSessionData, $_SESSION, true);
}
Expand Down

0 comments on commit 0995dc8

Please sign in to comment.