The Export administration screen has the following error repeated several times:

warning: Invalid argument supplied for foreach() in /home/youdrup/domains/youdrup.com/public_html/sites/all/modules/media_mover/media_mover_api_io.inc on line 187.

The export code reads:

$configuration->required = array('','','','');

I have entered two configurations (neither of which seem to run). One is harvest from a file field/process ffmpeg to convert to flv/store into another cck field/publish. The other is the same, except it extracts a thumbnail for process.

CommentFileSizeAuthor
#3 bug.configexport.txt3 KBkobnim

Comments

arthurf’s picture

Status: Active » Fixed

this was fixed under #341904 Thanks for the catch

Status: Fixed » Closed (fixed)

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

kobnim’s picture

Version: 6.x-1.x-dev » 6.x-1.0-beta9
Status: Closed (fixed) » Active
StatusFileSize
new3 KB

I am reopening this issue. I had been using beta7, and had no problem exporting. However, I just upgraded from beta7 to beta9, and when I try to export, I got this warning message:

warning: implode() [function.implode]: Invalid arguments passed in /mysite/sites/all/modules/media_mover/media_mover_api_io.inc on line 243.

Here is the media-mover configuration I tried to export:
(a) Harvest: Select "Harvest from a CCK Field"
(b) Process: Select "upload to youtube"
(c) Complete: Select "save data in the embedded media field"

The warning message comes from this function. I have marked line 243.

function media_mover_api_export_array_helper($data, $depth = '  ') {
  if (is_array($data)) {
  	$output = " array(\n";
  	foreach ($data as $key => $value) {
  		if (is_array($data[$key])) {
  			$items[] = "$depth'$key' => ". media_mover_api_export_array_helper($value, $depth . '  ');
  		}
  		else {
  			$items[] = "$depth'$key' => '$value'";
  		}
  	}
	$output .= implode(",\n", $items) ."\n". substr($depth, 2) . ')'; // <----- line 243
    return $output;
  }
  else {
    return "'$data'";
  }
}

I added some debug code, and found that this function gets called 7 times. In 6 of those 7 times, $data and $output look good (as far as I can tell). However, in one of the 7 times, the function is called with an empty $data variable, and I am guessing that is causing the error.

Is there any additional information you need, to help you track this down?

Thanks very much,
Mindy

P.S. I am attaching the exported file.