Closed (fixed)
Project:
Advanced Forum
Version:
6.x-2.0-alpha1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Aug 2009 at 15:49 UTC
Updated:
11 Sep 2009 at 21:20 UTC
I have enabled the E_NOTICE level, and I always get a warning
notice: Undefined index: #node in D:\develop\xampp\htdocs\drupal\modules\advanced_forum\advanced_forum.module on line 318.
function advanced_forum_form_alter(&$form, &$form_state, $form_id) {
if (advanced_forum_type_is_in_forum($form['#node']->type)) {
// [...]
advanced_forum_type_is_in_forum allways makes a call to advanced_forum_get_forum_types
maybe some of these calls can be avoid just checking #node
function advanced_forum_form_alter(&$form, &$form_state, $form_id) {
if (isset($form['#node']) && advanced_forum_type_is_in_forum($form['#node']->type)) {
// [...]
Hope it helps.
Comments
Comment #1
michelleThanks, I'll have a look at that next time I work on AF.
Michelle
Comment #2
michelleI just looked at the code that's there and it's:
if (!empty($form['#node']->type) && advanced_forum_type_is_in_forum($form['#node']->type)) {So it looks like it already got fixed at some point since alpha 1.
Michelle