Don't save undefined atributes.
This commit is contained in:
		| @@ -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(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user