diff --git a/src/Libs/ModelMySQL.php b/src/Libs/ModelMySQL.php index 759cf34..4f1f8d7 100644 --- a/src/Libs/ModelMySQL.php +++ b/src/Libs/ModelMySQL.php @@ -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();