Commit c0c2384c by Scott

Fix database error when profile fields are missing

parent 544e36a4
......@@ -104,7 +104,9 @@ class qa_filter_basic
public function filter_profile(&$profile, &$errors, $user, $oldprofile)
{
foreach ($profile as $field => $value) {
foreach (array_keys($profile) as $field) {
// ensure fields are not NULL
$profile[$field] = (string) $profile[$field];
$this->validate_field_length($errors, $profile, $field, 0, QA_DB_MAX_CONTENT_LENGTH);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment