Commit 8c9dadf3 by Qiang Xue

Fixed DB validation handling for model generator.

parent 618f9811
......@@ -464,6 +464,9 @@ class Generator extends \yii\gii\Generator
return $this->_tableNames;
}
$db = $this->getDbConnection();
if ($db === null) {
return array();
}
$tableNames = array();
if (strpos($this->tableName, '*') !== false) {
if (($pos = strrpos($this->tableName, '.')) !== false) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment