Skip to content
Snippets Groups Projects
Commit 5f88feb2 authored by Jared Hancock's avatar Jared Hancock
Browse files

faq: Don't crash when adding with validation error

On validation errors, `$faq` will be set to something non-null, like
`false`, but will not be an instance of a Faq article.
parent 6c1e759c
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info); ...@@ -90,7 +90,7 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
<textarea name="answer" cols="21" rows="12" <textarea name="answer" cols="21" rows="12"
style="width:98%;" class="richtext draft" style="width:98%;" class="richtext draft"
data-draft-namespace="faq" data-draft-namespace="faq"
data-draft-object-id="<?php if (isset($faq)) echo $faq->getId(); ?>" data-draft-object-id="<?php if (is_object($faq)) echo $faq->getId(); ?>"
><?php echo $info['answer']; ?></textarea> ><?php echo $info['answer']; ?></textarea>
</td> </td>
</tr> </tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment