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(); }