Published by exdone
Posted on May 10, 2009
error:
Warning: array_flip() [function.array-flip]: The argument should be an array in path\path on line 1224
issue: this occurs if you are using the latest version of easypopulate on a PHP 4 server.
fix :
The length parameter has been set to 0 on line 1222, which is OK for PHP5, but PHP4 needs a real number. I changed mine to 1000 and it now works fine.
was:
} else if($filelayout = array_flip(fgetcsv($handle, 0, $csv_deliminator, $csv_enclosure))) {
now:
} else if($filelayout = array_flip(fgetcsv($handle, 1000, $csv_deliminator, $csv_enclosure))) {
PHP reference
Web Forum