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
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-03-28 09:48:13 +0300
committerdiosmosis <benaka@piwik.pro>2015-03-28 09:48:13 +0300
commiteb816e39e6bfd050f8bda3851bacb72f38a1ec61 (patch)
treef91a5a5787e4acbf776aa3711a4155d399cf6820 /core/Concurrency/DistributedList.php
parentf595087622b06707a67d761e07cf0147f0ace6b5 (diff)
Refs #7560, avoid array to string conversion notice in DistributedList & descendents. Throws exception instead so a stack trace can be found.
Diffstat (limited to 'core/Concurrency/DistributedList.php')
-rw-r--r--core/Concurrency/DistributedList.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/Concurrency/DistributedList.php b/core/Concurrency/DistributedList.php
index eecfab6a55..6c6ce340c0 100644
--- a/core/Concurrency/DistributedList.php
+++ b/core/Concurrency/DistributedList.php
@@ -62,8 +62,12 @@ class DistributedList
*/
public function setAll($items)
{
- foreach ($items as &$item) {
- $item = (string)$item;
+ foreach ($items as $key => &$item) {
+ if (is_array($item)) {
+ throw new \InvalidArgumentException("Array item encountered in DistributedList::setAll() [ key = $key ].");
+ } else {
+ $item = (string)$item;
+ }
}
Option::set($this->optionName, serialize($items));