mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-11-30 02:37:58 +08:00
Return empty collection when ids is empty.
This commit is contained in:
parent
5a70f8ba3d
commit
1c1819eab4
@ -97,6 +97,10 @@ class Manager
|
||||
*/
|
||||
public function findManyFromCache(array $ids, string $class): Collection
|
||||
{
|
||||
if (count($ids) === 0) {
|
||||
return new Collection([]);
|
||||
}
|
||||
|
||||
/** @var Model $instance */
|
||||
$instance = new $class();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user