Commit a17d24f0 authored by Dries's avatar Dries

- Patch #652232 by moshe weitzman: don't assume that session exists during batch cleanup.

parent 66f740c5
......@@ -448,10 +448,12 @@ function _batch_finished() {
$_batch = $batch;
$batch = NULL;
// Clean-up the session.
unset($_SESSION['batches'][$batch['id']]);
if (empty($_SESSION['batches'])) {
unset($_SESSION['batches']);
// Clean-up the session. Not needed for CLI updates.
if (isset($_SESSION)) {
unset($_SESSION['batches'][$batch['id']]);
if (empty($_SESSION['batches'])) {
unset($_SESSION['batches']);
}
}
// Redirect if needed.
......
Markdown is supported
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