While running PHP5.3, I noticed the above error message when trying to import a csv file into table wizard. Because of this the import fails. It looks like another one of those ref, value strictness bugs in PHP5.3.

Here's a rather simple change that seems to work on my box.

change in tw_import_delimited.module


function _tw_import_delimited_import_file(&$srcinfo, &$context) {
  if (!isset($context['sandbox']['total'])) {
    $context['sandbox']['total'] = filesize($srcinfo->filepath);
    $context['sandbox']['done'] = $srcinfo->offset;
    $context['sandbox']['rows'] = 0;
  }

to

function _tw_import_delimited_import_file($srcinfo, &$context) {
  if (!isset($context['sandbox']['total'])) {
    $context['sandbox']['total'] = filesize($srcinfo->filepath);
    $context['sandbox']['done'] = $srcinfo->offset;
    $context['sandbox']['rows'] = 0;
  }

Comments

adam_b’s picture

Confirm that I was having the same problem - tried the dev version but it didn't help. This change appears to have solve it - thanks :)

mikeryan’s picture

Status: Active » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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

verta’s picture

Worked for me too.

Not sure what the release schedule is, but it's been a couple of months. Hosts are starting to deploy PHP 5.3, the sooner this gets out of dev and into a main release, the fewer people will be hitting this fixed bug and have to use a dev release to work around it.

pgvalcke’s picture

This worked fine for me ! thanks