Closed (fixed)
Project:
Advanced Forum
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2013 at 13:29 UTC
Updated:
23 Feb 2013 at 18:50 UTC
When creating a forum thread, on Preview action a "Notice: Undefined property: stdClass::$comment_count" is thrown.
Full error message is:
Notice: Undefined property: stdClass::$comment_count în advanced_forum_preprocess_advanced_forum_topic_header() (linia 452 din /home/bla/public_html/blablabla/sites/all/modules/advanced_forum/includes/theme.inc).
Proposed fix:
Change line 452 from file "theme.inc" from
pager_default_initialize($variables['node']->comment_count, variable_get('comment_default_per_page_' . $variables['node']->type, 50));
to
if(isset($variables['node']->comment_count)) pager_default_initialize($variables['node']->comment_count, variable_get('comment_default_per_page_' . $variables['node']->type, 50));
Comments
Comment #1
troky commentedCommitted.