Fix bug - refs BT#8525

I don't like this comparison. The Database::query() returns the result of mysql_query(), which is false on error, but otherwise it can also be a series of different things. The correct comparison here should be: if ($resQuestions !== false)