I get this error and wondering if anyone else gets it or knows a fix. I have devel installed which spits this out

warning: Invalid argument supplied for foreach() in /home/leukemia/public_html/modules/matrix/matrix.module on line 179

So when I got to create content the matrix field doesn't show so not sure even what this module looks like but I think it does what I wanted to do.

Using drupal 5.3

Comments

deadlyromio’s picture

Although I get the error...I turned off node reference and was able to use it with the error...thanks anyways

mrf’s picture

Getting the same error on 5.3, turned of node reference, but still getting it.

This is what the function at line 179 looks like:

  foreach ($form['matrix'] as $row_key => $fields) {
    if (!empty($form['first_col']['#value'][$row_key])) {
      $row = array();
      $row[] = $form['first_col']['#value'][$row_key];
      foreach ($fields as $col_key => $field) {
        if ($field['#type'] == 'textfield') {
          $row[] = drupal_render($form['matrix'][$row_key][$col_key]);
        }
      }
      $rows[] = $row;
    }
  }

Makes me think that the error is coming from somewhere outside, but I'm not too sure whats causing it.

mrf’s picture

Status: Active » Closed (duplicate)

Looks like this is the same issue as the following: http://drupal.org/node/173869