[RSS Feed/News] Thread:preSave() does not give expected type of error without a forum

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
If $forum is null, then the code which uses $forumTypeHandler which is on all branches after fetching it from $forum; will be accessing a method on a null object instead of throwing/logging a useful/standard error message.

PHP:

Code:
$forumTypeHandler = $forum ? $forum->TypeHandler : null;

if (!$this->discussion_type)
{
...

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom