Browse Source

feat: fix unittest

tags/2.0.33
Ather Shu 5 years ago
parent
commit
358e3518b3
  1. 2
      framework/db/mysql/QueryBuilder.php

2
framework/db/mysql/QueryBuilder.php

@ -395,7 +395,7 @@ class QueryBuilder extends \yii\db\QueryBuilder
// https://github.com/yiisoft/yii2/issues/13749#issuecomment-481657224 // https://github.com/yiisoft/yii2/issues/13749#issuecomment-481657224
$key = [__METHOD__, $this->db->dsn]; $key = [__METHOD__, $this->db->dsn];
$cache = null; $cache = null;
$schemaCache = is_string($this->db->schemaCache) ? \Yii::$app->get($this->db->schemaCache, false) : $this->db->schemaCache; $schemaCache = ( \Yii::$app && is_string($this->db->schemaCache) ) ? \Yii::$app->get($this->db->schemaCache, false) : $this->db->schemaCache;
if ( $this->db->enableSchemaCache && $schemaCache instanceof CacheInterface ) { if ( $this->db->enableSchemaCache && $schemaCache instanceof CacheInterface ) {
$cache = $schemaCache; $cache = $schemaCache;
} }

Loading…
Cancel
Save