summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-06 16:21:58 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-06 16:21:58 +0000
commita17d24f0b0964ec18e1ce9f810ff36527f6a9b1e (patch)
tree011fc425498e1a98657bc67cc887ca2791ca2687 /includes
parent66f740c58475b84b907326a0e50e4d91c2fc03ee (diff)
downloadbrdo-a17d24f0b0964ec18e1ce9f810ff36527f6a9b1e.tar.gz
brdo-a17d24f0b0964ec18e1ce9f810ff36527f6a9b1e.tar.bz2
- Patch #652232 by moshe weitzman: don't assume that session exists during batch cleanup.
Diffstat (limited to 'includes')
-rw-r--r--includes/batch.inc10
1 files changed, 6 insertions, 4 deletions
diff --git a/includes/batch.inc b/includes/batch.inc
index 2f0d26055..4b3e0f365 100644
--- a/includes/batch.inc
+++ b/includes/batch.inc
@@ -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.