All worked fine untill i changed the date format to dd/mm/yyyy in date components. I got this error

Fatal error: Cannot unset string offsets in /home/xxxxxx/public_html/emigrareaustralia.info/sites/all/modules/webform_report/webform_report.inc on line 1252

Comments

Anonymous’s picture

To get it working i've commented out

          unset($cell['hidden']);
          unset($cell['sort']);
          unset($cell['field']);

from

  // filter out hidden columns
  $out = array();
  if (count($rows) > 0 && is_array($pages[$page])) {
    foreach ($pages[$page] as $row) {
      $outrow = array();
      foreach ($row as $cell) {
        $hide = isset($cell['hidden']) ? $cell['hidden'] : FALSE;
        if (!$hide) {
          // remove cell attributes
          unset($cell['hidden']);
          unset($cell['sort']);
          unset($cell['field']);
          $outrow[] = $cell;
        }
      }
      $out[] = $outrow;
    }
  }

So now it looks like this:

  // filter out hidden columns
  $out = array();
  if (count($rows) > 0 && is_array($pages[$page])) {
    foreach ($pages[$page] as $row) {
      $outrow = array();
      foreach ($row as $cell) {
        $hide = isset($cell['hidden']) ? $cell['hidden'] : FALSE;
        if (!$hide) {
          // remove cell attributes
         # unset($cell['hidden']);
         #   unset($cell['sort']);
         #  unset($cell['field']);
          $outrow[] = $cell;
        }
      }
      $out[] = $outrow;
    }
  }
jphelan’s picture

Same thing in 6.x-2.1

Fatal error: Cannot unset string offsets in /home/mysite/public_html/sites/all/modules/webform_report/webform_report.inc on line 1249

Vako’s picture

I had the exact same error on line 1252. My form had a date field on it, when I removed the date column, everything worked fine. But I wish we can have a solution for this because I do need the date column.

raul.vadillo’s picture

Issue summary: View changes

I get the same error in the same sentence. I have date components in dd/mm/yyyy format too.

What is the effect in the report of comment that lines?

Any solution?

jimbullington’s picture

Status: Active » Needs review

This should be corrected - please try the latest dev release at your convenience.

jphelan’s picture

Latest dev appears to have fixed the issue for me.