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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
bb2e19fa
Commit
bb2e19fa
authored
Jun 22, 2013
by
Alexander Kochetov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ActiveRecord::setOldAttribute() bugfix
parent
8de3ffab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
ActiveRecord.php
framework/yii/db/ActiveRecord.php
+6
-1
No files found.
framework/yii/db/ActiveRecord.php
View file @
bb2e19fa
...
...
@@ -572,11 +572,16 @@ class ActiveRecord extends Model
* Sets the old value of the named attribute.
* @param string $name the attribute name
* @param mixed $value the old attribute value.
* @throws InvalidParamException if the named attribute does not exist.
* @see hasAttribute
*/
public
function
setOldAttribute
(
$name
,
$value
)
{
$this
->
_oldAttributes
[
$name
]
=
$value
;
if
(
isset
(
$this
->
_oldAttributes
[
$name
])
||
isset
(
$this
->
getTableSchema
()
->
columns
[
$name
]))
{
$this
->
_oldAttributes
[
$name
]
=
$value
;
}
else
{
throw
new
InvalidParamException
(
get_class
(
$this
)
.
' has no attribute named "'
.
$name
.
'".'
);
}
}
/**
...
...
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