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
d5176a46
Commit
d5176a46
authored
Dec 31, 2014
by
Alexander Kochetov
Committed by
Carsten Brandt
Dec 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better exception message
- yii\db\BaseActiveRecord::findByCondition better exception - yii\db\ActiveRecord::findByCondition better exception close #6704
parent
4ab3dd0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ActiveRecord.php
framework/db/ActiveRecord.php
+1
-1
BaseActiveRecord.php
framework/db/BaseActiveRecord.php
+1
-1
No files found.
framework/db/ActiveRecord.php
View file @
d5176a46
...
...
@@ -184,7 +184,7 @@ class ActiveRecord extends BaseActiveRecord
}
$condition
=
[
$pk
=>
$condition
];
}
else
{
throw
new
InvalidConfigException
(
get_called_class
()
.
'
must have a primary key.'
);
throw
new
InvalidConfigException
(
'"'
.
get_called_class
()
.
'"
must have a primary key.'
);
}
}
...
...
framework/db/BaseActiveRecord.php
View file @
d5176a46
...
...
@@ -129,7 +129,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
if
(
isset
(
$primaryKey
[
0
]))
{
$condition
=
[
$primaryKey
[
0
]
=>
$condition
];
}
else
{
throw
new
InvalidConfigException
(
get_called_class
()
.
'
must have a primary key.'
);
throw
new
InvalidConfigException
(
'"'
.
get_called_class
()
.
'"
must have a primary key.'
);
}
}
...
...
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