Don't save undefined atributes.
This commit is contained in:
parent
d04cd18c9a
commit
5679bbf2c5
@ -243,8 +243,10 @@ class ModelMySQL {
|
||||
$atts = $this->getVars();
|
||||
|
||||
foreach ($atts as $key => $value) {
|
||||
$into[] = "`$key`";
|
||||
$values[] = "'".$db->real_escape_string($value)."'";
|
||||
if (isset($value)) {
|
||||
$into[] = "`$key`";
|
||||
$values[] = "'".$db->real_escape_string($value)."'";
|
||||
}
|
||||
}
|
||||
|
||||
$table = static::table();
|
||||
|
Loading…
Reference in New Issue
Block a user