Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
239778ef
Commit
239778ef
authored
Jan 02, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor issue fix about fixture controllers.
parent
9f74bba3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
FixtureController.php
extensions/yii/faker/FixtureController.php
+1
-1
FixtureController.php
framework/yii/console/controllers/FixtureController.php
+5
-5
No files found.
extensions/yii/faker/FixtureController.php
View file @
239778ef
...
...
@@ -219,7 +219,7 @@ class FixtureController extends \yii\console\controllers\FixtureController
if
(
empty
(
$files
))
{
throw
new
Exception
(
"No files were found by name:
\"
{
$file
}
\"
.
\n
"
"No files were found by name:
\"
"
.
implode
(
', '
,
$file
)
.
"
\"
.
\n
"
.
"Check that template with these name exists, under template path:
\n\"
{
$templatePath
}
\"
."
);
}
...
...
framework/yii/console/controllers/FixtureController.php
View file @
239778ef
...
...
@@ -8,8 +8,8 @@
namespace
yii\console\controllers
;
use
Yii
;
use
yii\base\InvalidConfigException
;
use
yii\console\Controller
;
use
yii\console\Exception
;
use
yii\test\DbTestTrait
;
/**
...
...
@@ -122,14 +122,14 @@ class FixtureController extends Controller
/**
* Checks if the database and fixtures path are available.
* @throws
InvalidConfig
Exception
* @throws Exception
*/
public
function
checkRequirements
()
{
$path
=
Yii
::
getAlias
(
$this
->
fixturePath
,
false
);
if
(
!
is_dir
(
$path
)
||
!
is_writable
(
$path
))
{
throw
new
InvalidConfig
Exception
(
"The fixtures path
\"
{
$this
->
fixturePath
}
\"
not exist or is not writable"
);
throw
new
Exception
(
"The fixtures path
\"
{
$this
->
fixturePath
}
\"
not exist or is not writable"
);
}
}
...
...
@@ -137,14 +137,14 @@ class FixtureController extends Controller
/**
* Returns database connection component
* @return \yii\db\Connection
* @throws
InvalidConfig
Exception if [[db]] is invalid.
* @throws Exception if [[db]] is invalid.
*/
public
function
getDbConnection
()
{
$db
=
Yii
::
$app
->
getComponent
(
$this
->
db
);
if
(
$db
==
null
)
{
throw
new
InvalidConfig
Exception
(
"There is no database connection component with id
\"
{
$this
->
db
}
\"
."
);
throw
new
Exception
(
"There is no database connection component with id
\"
{
$this
->
db
}
\"
."
);
}
return
$db
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment