summaryrefslogtreecommitdiff
path: root/includes/pages/user_questions.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-07-23 11:46:54 +0200
committermsquare <msquare@notrademark.de>2017-07-23 11:46:54 +0200
commita157004f4aefaa5e2265f852f9432becedee1d66 (patch)
treec47915a311371afa7aa962655fd5ff1ff2ab5e64 /includes/pages/user_questions.php
parent36446dd644ff865d1d63aab0ba4c670ce2b277d1 (diff)
handle failed db queries in Db class
Diffstat (limited to 'includes/pages/user_questions.php')
-rw-r--r--includes/pages/user_questions.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/includes/pages/user_questions.php b/includes/pages/user_questions.php
index fdf76aee..e90ea011 100644
--- a/includes/pages/user_questions.php
+++ b/includes/pages/user_questions.php
@@ -39,15 +39,13 @@ function user_questions()
case 'ask':
$question = strip_request_item_nl('question');
if ($question != '') {
- $result = DB::insert('
+ DB::insert('
INSERT INTO `Questions` (`UID`, `Question`)
VALUES (?, ?)
',
[$user['UID'], $question]
);
- if (!$result) {
- engelsystem_error(_('Unable to save question.'));
- }
+
success(_('You question was saved.'));
redirect(page_link_to('user_questions'));
} else {