Fixed bad instnaceof check in yii\db\Schema::getTableMetadata()

This commit is contained in:
Alexander Makarov
2018-05-12 14:17:59 +03:00
parent a8d95f429d
commit cc2cac58d2
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ Yii Framework 2 Change Log
- Bug #16245: Fixed `__isset()` in `BaseActiveRecord` not catching errors (sammousa)
- Enh #16191: Enhanced `yii\helpers\Inflector` to work correctly with UTF-8 (silverfire)
- Bug: Fixed bad instnaceof check in `yii\db\Schema::getTableMetadata()` (samdark)
2.0.15.1 March 21, 2018

View File

@ -732,7 +732,7 @@ abstract class Schema extends BaseObject
$cache = null;
if ($this->db->enableSchemaCache && !in_array($name, $this->db->schemaCacheExclude, true)) {
$schemaCache = is_string($this->db->schemaCache) ? Yii::$app->get($this->db->schemaCache, false) : $this->db->schemaCache;
if ($schemaCache instanceof Cache) {
if ($schemaCache instanceof CacheInterface) {
$cache = $schemaCache;
}
}