The drop is always movingYou know that saying about standing on the shoulders of giants? Drupal is standing on a huge pile of midgetsAll content management systems suck, Drupal just happens to suck less.Popular open source software is more secure than unpopular open source software, because insecure software becomes unpopular fast. [That doesn't happen for proprietary software.]Drupal makes sandwiches happen.There is a module for that

How I debugged a form.inc bug in no time?

Submitted by nk on Thu, 2005-10-27 23:10

warning: Invalid argument supplied for foreach() in /tmp/drupal/includes/form.inc on line 232. where line 232 is foreach ($form['#parents'] as $parent) { so I add if (!is_array($form['#parents'])) var_dump($form['#parents']);. I get an 'L'. OK, this have not helped much -- $form is a string where the 0th offset is an L, so let's dump$form>! string(17) "Leave shadow copy" Oh! There you are. A # was missing in the title. So easy.

Sometimes it's element_child. It's still easy -- the if (!is_array( is always the same and you have $form or $element in it, depending on the situation.

Commenting on this Story is closed.