summaryrefslogtreecommitdiff
path: root/includes/pages/user_questions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages/user_questions.php')
-rw-r--r--includes/pages/user_questions.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/pages/user_questions.php b/includes/pages/user_questions.php
index 19999577..29925a4f 100644
--- a/includes/pages/user_questions.php
+++ b/includes/pages/user_questions.php
@@ -29,6 +29,7 @@ function user_questions()
'SELECT * FROM `Questions` WHERE NOT `AID` IS NULL AND `UID`=?',
[$user->id]
);
+
foreach ($answered_questions as &$question) {
$answer_user_source = User::find($question['AID']);
$question['answer_user'] = User_Nick_render($answer_user_source);
@@ -42,8 +43,8 @@ function user_questions()
} else {
switch ($request->input('action')) {
case 'ask':
- $question = strip_request_item_nl('question');
- if ($question != '' && $request->hasPostData('submit')) {
+ $question = request()->get('question');
+ if (!empty($question) && $request->hasPostData('submit')) {
DB::insert('
INSERT INTO `Questions` (`UID`, `Question`)
VALUES (?, ?)