From 5b61c9718df57f3e4f0f64268fc3d7a78f435672 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 7 Dec 2019 23:28:04 +0100 Subject: [PATCH] add allowed datatype --- DataStorage/Cache/Connection/MemCached.php | 4 ++-- DataStorage/Cache/Connection/RedisCache.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DataStorage/Cache/Connection/MemCached.php b/DataStorage/Cache/Connection/MemCached.php index ae6c20950..ab8dafb82 100644 --- a/DataStorage/Cache/Connection/MemCached.php +++ b/DataStorage/Cache/Connection/MemCached.php @@ -80,7 +80,7 @@ class MemCached extends ConnectionAbstract return; } - if (!(\is_scalar($value) || $value === null || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { + if (!(\is_scalar($value) || $value === null || \is_array($value) || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { throw new \InvalidArgumentException(); } @@ -96,7 +96,7 @@ class MemCached extends ConnectionAbstract return false; } - if (!(\is_scalar($value) || $value === null || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { + if (!(\is_scalar($value) || $value === null || \is_array($value) || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { throw new \InvalidArgumentException(); } diff --git a/DataStorage/Cache/Connection/RedisCache.php b/DataStorage/Cache/Connection/RedisCache.php index daa6d47ea..78ec45ba6 100644 --- a/DataStorage/Cache/Connection/RedisCache.php +++ b/DataStorage/Cache/Connection/RedisCache.php @@ -95,7 +95,7 @@ class RedisCache extends ConnectionAbstract return; } - if (!(\is_scalar($value) || $value === null || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { + if (!(\is_scalar($value) || $value === null || \is_array($value) || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { throw new \InvalidArgumentException(); } @@ -115,7 +115,7 @@ class RedisCache extends ConnectionAbstract return false; } - if (!(\is_scalar($value) || $value === null || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { + if (!(\is_scalar($value) || $value === null || \is_array($value) || $value instanceof \JsonSerializable || $value instanceof \Serializable)) { throw new \InvalidArgumentException(); }