#1744 - Fatal PHP error with quick replies when permission for quick replies is turned off

  • By
  • Added
  • 1 view
Identifier #1744
Issue type Minor issue (breaks specific functionality)
Title Fatal PHP error with quick replies when permission for quick replies is turned off
Status Completed
Handling member Chris Graham
Addon cns_forum
Description PHP NOTICE [8] Undefined index: may_use_quick_reply in sources/cns_topicview.php on line 651 (version: 9.0.16, PHP version: 5.4.35, URL: /pg/polls/view/5)

The line reads:

if ((array_key_exists('message_comcode',$_postdetails)) && (!is_null($_postdetails['message_comcode'])) && (strlen($_postdetails['message_comcode'])<1024*10/*10kb limit, for reasonable performance*/) && ($topic_info['may_use_quick_reply']) && (!array_key_exists('intended_solely_for',$map)))

---

When you visit any form of topic where a quick reply box is to be shown, the site will fatally error if the quick reply permission for that user is not active.
Steps to reproduce

1. Go into the Admin Zone

2. Go into permissions

3. Disable quick reply for certain usergroups

4. The members who fall in usergroups that do not have permission to use quick reply will get a fatal PHP error whenever they go to a location on site where they'd typically be presented with a quick reply box.

Funded? No
Commits

dd24273

The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated