File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -74,13 +74,12 @@ abstract class Entity implements IEntity
74
74
private $ _reflection = null ;
75
75
76
76
/**
77
- * The array of database column of this entity.
77
+ * The array of database columns of this entity.
78
78
*
79
79
* @var Column[]
80
80
*/
81
81
private $ _columns = array ();
82
82
83
-
84
83
/**
85
84
* Entity constructor.
86
85
*
@@ -133,7 +132,7 @@ public function hydrate(array $data)
133
132
foreach ($ this ->_columns as $ property => $ column ) {
134
133
if (array_key_exists ($ column ->getName (), $ this ->raw )) {
135
134
$ this ->{$ property } = $ this ->raw [$ column ->getName ()];
136
- } else {
135
+ } elseif ( \is_null ( $ this ->{ $ property }) || $ this ->{ $ property } === null ) {
137
136
$ this ->{$ property } = $ column ->getDefault ();
138
137
}
139
138
}
You can’t perform that action at this time.
0 commit comments