Dont worry Yoran, it's not a big deal:
On the latest dev (2011-Jun-18) i got a Fatal error here: PHP Fatal error: Unsupported operand types in /Users/nico/Sites/drupal/modules/filebrowser/filebrowser.module on line 149. And i think it comes from PHP5 (i can not test with PHP4):
$form += _filebrowser_form_file_handlers_part($file_handlers, $parts_weight++);
// Fatal error because the result == NULL
Why not do something like this:
$form = array_merge($form, (array)_filebrowser_form_file_handlers_part($file_handlers, $parts_weight++));
You have to typecasting the result to be compatible with array_merge() PHP5. But needs to be tested with PHP4 (Status to this tracker to needs review)
Comments
Comment #1
Nicolas Georget commentedFor those who wants try with PHP5:
filebrowser_form(&$node, $form_state)line 144 to 147:filebrowser_admin_settings()line 31 to 34:Comment #2
Yoran commentedSorry but I'm not sure this is the way to solve this. By design, _filebrowser_form_XXX_part should never return NULL. For this is where the bug is (the first part at least). Is this the only reason you choose array_merge vs lighter "+=" ?
Comment #3
Nicolas Georget commentedIt's this one who returns NULL on line 147:
And in
node.inc » _filebrowser_form_file_handlers_partfunction, the $handlers variable:So the following condition is not executed:
Yes ;-)
Comment #4
Yoran commentedI just added a $form=array(); at the beginning of the function in order to make this "compliant" :)
Comment #5
Nicolas Georget commentedPerfect, It's compliant now!