Remove $form = NULL from the code

kiamlaluno - June 10, 2008 - 18:02
Project:Node Family
Version:5.x-1.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I had problems with nodefamily.module. After a long debug, I discovered the module uses lines like

<?php
  $form
= NULL;
?>

That line is present in nodefamily_nodeapi(), where is absolutely useless (it changes the value of $form, which is a local variable, and not a parameter passed by reference to the function).
It is also present in nodefamily_form_alter(), where it has the effect of unsetting all the array keys for the array passed by reference to the function; in that way, all the modules which are trying to change the same form stop to work, and so do the Drupal core modules, which don't find the array keys they set for that kind of form.

#1

fago - June 11, 2008 - 09:25
Status:active» fixed

indeed, in nodeapi it does nothing. The other code part was never used - so I removed both. Anyway, it wasn't causing any problems.

#2

Anonymous (not verified) - June 25, 2008 - 09:33
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.