Invalid argument supplied for foreach() user_import.module on line 1336
kenorb - July 21, 2009 - 15:08
| Project: | User Import |
| Version: | 6.x-2.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
I've found it in logs during user import.
URL: admin/user/user_import/import/2

#1
<?phpfunction _user_import_update_user_check($settings) {
foreach ($settings as $setting) {
?>
when this function is executed?
#2
Same error here, when importing a pretty large file though (80,000 users) - not sure if the size has any impact...
#3
Can you please test on User Import 6.2.1 and re-open this issue if it still exists.
#4
Same problem here but on line 1336 ? I don't know if it's the same problem.
For me, this error appears when I try to import a CSV with duplicate email in it. Btw, I can see it in error log: "duplicate email". I think User Import check your CSV to see if an email isn't already in database, but it's not checking if you have a mail twice in your CSV.
#5
Is this still an issue in User Import 6.2.2?
#6
I use 6.2.2.
#7
#8
#9
I'm using 6.x-2.2 and still getting this error.
Any ideas for a temporary fix?
#10
I had 10 errors of this kind while importing 2721 users in chunks of 250 - that is, 1 error per "continue processing" page, except for the first processed page. Other than this message, import was successful - i.e. with no duplicate emails or something like that.
#11
After setting "users per process" to 3000, and performing users import in one run - there were no "invalid argument" messages at all.
I believe this could be a temporary workaround :) - that is, setting "users per process" to a value higher than the number of users. Just don't forget to tweak PHP's max_execution_time, if you are importing lots of users.
#12
I set my max value to 1000 for an import of only 300 and I still get the error message. It only imported about 80 of the users. Any help would be greatly appreciated.
FYI - I looked for a max_execution_time in phpMyAdmin and found nothing.
#13
max_execution_time is a PHP configuration parameter, usually found in the php.ini file. By default, it is set to 30 seconds - any script running longer than that will be terminated. I believe time is measured by CPU time, so under heavy load observed wall-clock time will be over 30 seconds.
Import of 3k users took somewhere between 60 and 180 seconds on my 3GHz system (do not quite remember).