Fixed invalid argument supplied for foreach(). (#2452)

* Update InvalidCacheManager.php

* Update CHANGELOG-2.0.md
This commit is contained in:
李铭昕 2020-09-07 13:37:49 +08:00 committed by GitHub
parent 378a930f7a
commit 0c2387591c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@
## Optimized
- [#2429](https://github.com/hyperf/hyperf/pull/2429) Optimized error message when does not set the value of `@var` for `@Inject`.
- [#2438](https://github.com/hyperf/hyperf/pull/2438) Optimized code for deleting model cache when model deleted or saved in transaction.
- [#2438](https://github.com/hyperf/hyperf/pull/2438) [#2452](https://github.com/hyperf/hyperf/pull/2452) Optimized code for deleting model cache when model deleted or saved in transaction.
# v2.0.9 - 2020-08-31

View File

@ -20,7 +20,7 @@ class InvalidCacheManager
/**
* @var CacheableInterface[]
*/
protected $models;
protected $models = [];
public function push(CacheableInterface $model): void
{