Don't save undefined atributes.
This commit is contained in:
parent
5679bbf2c5
commit
a7cb44a04b
@ -223,9 +223,11 @@ class ModelMySQL {
|
||||
$atts = $this->getVars();
|
||||
|
||||
foreach ($atts as $key => $value) {
|
||||
if (isset($value)) {
|
||||
$value = static::db()->real_escape_string($value);
|
||||
$set[]="$key='$value'";
|
||||
}
|
||||
}
|
||||
|
||||
$table = static::table();
|
||||
$pk = static::$primaryKey;
|
||||
|
Loading…
Reference in New Issue
Block a user