diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 26434bf..8ef7372 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -8,6 +8,7 @@ Yii Framework 2 Change Log - Enh #18628: Added strings "software", and "hardware" to `$specials` array in `yii\helpers\BaseInflector` (kjusupov) - Enh #18653: Added method `yii\helpers\BaseHtml::getInputIdByName()` (WinterSilence) - Enh #18669: Changed visibility of `yii\web\User::checkRedirectAcceptable()` to `public` (rhertogh) +- Bug #18678: Fix `yii\caching\DbCache` to use configured cache table name instead of the default one in case of MSSQL varbinary column type detection (aidanbek) 2.0.42.1 May 06, 2021 --------------------- diff --git a/framework/caching/DbCache.php b/framework/caching/DbCache.php index 191ba5c..dc7a131 100644 --- a/framework/caching/DbCache.php +++ b/framework/caching/DbCache.php @@ -305,7 +305,7 @@ class DbCache extends Cache { if ($this->isVarbinaryDataField === null) { $this->isVarbinaryDataField = in_array($this->db->getDriverName(), ['sqlsrv', 'dblib']) && - $this->db->getTableSchema('cache')->columns['data']->dbType === 'varbinary'; + $this->db->getTableSchema($this->cacheTable)->columns['data']->dbType === 'varbinary'; } return $this->isVarbinaryDataField; }