diff --git a/src/think/cache/Driver.php b/src/think/cache/Driver.php index 248260a7b3..1fe25c72a8 100644 --- a/src/think/cache/Driver.php +++ b/src/think/cache/Driver.php @@ -117,7 +117,7 @@ public function push($name, $value): void $item = $this->get($name, []); if (!is_array($item)) { - throw new InvalidArgumentException('only array cache can be push'); + $item = []; } $item[] = $value;