Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2016-02-01 17:52:20 +0300
committerThomas Steur <thomas.steur@gmail.com>2016-02-13 12:28:03 +0300
commitbe4ff3c091cff13af49041b59f12f97a466b0040 (patch)
tree8d242db72c0cd08cee26d26a229263ff765bc064 /libs
parente3c9440292d420dd9409d45bd2870976c8436e3b (diff)
show error message in case we deactivate a plugin because of missing dependencies
Diffstat (limited to 'libs')
-rw-r--r--libs/README.md1
-rw-r--r--libs/Zend/Session.php13
2 files changed, 14 insertions, 0 deletions
diff --git a/libs/README.md b/libs/README.md
index f5a061a1dc..083684c962 100644
--- a/libs/README.md
+++ b/libs/README.md
@@ -30,3 +30,4 @@ third-party libraries:
- ZF-10871 - undefined variables when socket support disabled
- fix #6980 ("Array to string conversion") in `Zend/Session/Exception.php`
- fix Zend/Validate using deprecated iconv_set_encoding()
+ - Make sure sessions work when storing notifications
diff --git a/libs/Zend/Session.php b/libs/Zend/Session.php
index b5177c18fd..8b55a17b6d 100644
--- a/libs/Zend/Session.php
+++ b/libs/Zend/Session.php
@@ -491,6 +491,10 @@ class Zend_Session extends Zend_Session_Abstract
self::regenerateId();
}
+ if (isset($_SESSION['data']) && is_string($_SESSION['data'])) {
+ $_SESSION = unserialize(base64_decode($_SESSION['data']));
+ }
+
// run validators if they exist
if (isset($_SESSION['__ZF']['VALID'])) {
self::_processValidators();
@@ -688,8 +692,17 @@ class Zend_Session extends Zend_Session_Abstract
parent::$_writable = false;
}
+ if (isset($_SESSION)) {
+ $sessionBkp = $_SESSION;
+ $_SESSION = array('data' => base64_encode(serialize($_SESSION)));
+ }
+
session_write_close();
self::$_writeClosed = true;
+
+ if (isset($sessionBkp)) {
+ $_SESSION = $sessionBkp;
+ }
}