mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixes #15302: Fixed yii\caching\DbCache
so that getValues
now behaves the same as getValue
with regards to streams
This commit is contained in:

committed by
Alexander Makarov

parent
d604d80823
commit
23630abe6d
@ -170,7 +170,11 @@ class DbCache extends Cache
|
||||
$results[$key] = false;
|
||||
}
|
||||
foreach ($rows as $row) {
|
||||
$results[$row['id']] = $row['data'];
|
||||
if (is_resource($row['data']) && get_resource_type($row['data']) === 'stream') {
|
||||
$results[$row['id']] = stream_get_contents($row['data']);
|
||||
} else {
|
||||
$results[$row['id']] = $row['data'];
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
|
Reference in New Issue
Block a user