Closed (fixed)
Project:
Advanced Help Injection and Export
Version:
6.x-1.0-alpha5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 May 2009 at 16:59 UTC
Updated:
29 May 2009 at 10:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
brahms commentedI have the same error messages. They come from line 654 in the file helpinject.module in function helpinject_help_link:
In my problem case
$elementis a string "node" and$form_idis the node object. In this case I would expect thatisset($element['#type'])will return FALSE because$elementis not an array and therefore the array key '#type' doesn't exist. I don't know why, but PHP returns TRUE forisset($element['#type'])instead (and "n" for$element['#type']) and so the IF condition is evaluated to TRUE and in the next line the function helpinject_get_from_key is called with the node object as parameter$form_idwhich leads to the error message later. It really seems to be an error in the isset function in PHP, I use PHP 5.1.6 under Red Hat Enterprise Linux 5.To prevent these errors I added
is_array($element)to the IF clause, the modified line 654 in the file helpinject.module is now:I attach a patch file for fixing the error
Comment #2
robertdouglass commentedNice analysis brahms. Is the patch still coming?
Comment #3
brahms commentedSorry Robert, here is the patch file.
Comment #4
robertdouglass commentedCommitted, thanks.