Easier debugging of forms code

Last modified: May 17, 2009 - 00:34

Replace the element_child in form.inc with this:

<?php
foreach($element as $k => $v) {
 
$result = array();
  if (
$k[0] != '#') {
    if (
is_array($v)) {
     
$result[] = $k;
    }
    else {
      die(
"You have a wrong key: $k");
    }
  }
  return
$result;
}
?>

 
 

Drupal is a registered trademark of Dries Buytaert.