Commit 3370cb23 by Scott

Fix missing error message when content too short

Fixes #327.
parent 281619b4
......@@ -70,6 +70,10 @@ class qa_filter_basic
$this->validate_field_length($errors, $question, 'content', 0, QA_DB_MAX_CONTENT_LENGTH); // for storage
$this->validate_field_length($errors, $question, 'text', qa_opt('min_len_q_content'), null); // for display
// ensure content error is shown
if (isset($errors['text'])) {
$errors['content'] = $errors['text'];
}
if (isset($question['tags'])) {
$counttags = count($question['tags']);
......@@ -149,7 +153,7 @@ class qa_filter_basic
$errorKey = $key;
}
// skip the field is key not set (for example, 'title' when recategorizing questions)
// skip the field if key not set (for example, 'title' when recategorizing questions)
if (array_key_exists($key, $post)) {
$length = qa_strlen($post[$key]);
......
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