Fix error on getVars when get not set properties.
This commit is contained in:
parent
9689ac82cf
commit
a23e795f5c
@ -196,7 +196,8 @@ class ModelMySQL {
|
|||||||
|
|
||||||
foreach($properties as $property) {
|
foreach($properties as $property) {
|
||||||
$att = $property->name;
|
$att = $property->name;
|
||||||
$result[$att] = $this->$att;
|
$result[$att] = isset($this->$att)
|
||||||
|
? $this->$att : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (static::$ignoreSave as $del) {
|
foreach (static::$ignoreSave as $del) {
|
||||||
@ -204,7 +205,8 @@ class ModelMySQL {
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (static::$forceSave as $value) {
|
foreach (static::$forceSave as $value) {
|
||||||
$result[$value] = $this->$value;
|
$result[$value] = isset($this->$value)
|
||||||
|
? $this->$value: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
Loading…
Reference in New Issue
Block a user