diff --git a/src/Libs/ModelMySQL.php b/src/Libs/ModelMySQL.php index 4f1f8d7..3b50f3e 100644 --- a/src/Libs/ModelMySQL.php +++ b/src/Libs/ModelMySQL.php @@ -223,8 +223,10 @@ class ModelMySQL { $atts = $this->getVars(); foreach ($atts as $key => $value) { - $value = static::db()->real_escape_string($value); - $set[]="$key='$value'"; + if (isset($value)) { + $value = static::db()->real_escape_string($value); + $set[]="$key='$value'"; + } } $table = static::table();