Quote:
Originally Posted by squidsk
What that means is that what is in $_POST['import'] is not an array so you cannot apply a foreach to it. In order to eliminate the warning, which actually has no impact on anything, is to check if $_POST['import'] is actually an array, by wrapping the foreach in an if statement that checks if the variable is an array.
E.G.
PHP Code:
if(is_array($_POST['import'])) {
foreach ($_POST['import'] AS $file => $null){
//content of the foreach loop is here and unchanged
}
}
Does this happen for all imports or only some of them? If all imports then it might be a bug in the code. If some, then it might be that parameters are not being passed correctly when the import button is clicked.
|
Thanks for this, but I figured it out... For somereason my screen wasn't showing the select box located at the end of each of the imported files. You must select what files from the import list you want to import. Since I wasn't seeing the check boxes I wasn't selecting one. Once I was able to see the boxes and select one the error went away.
One more suggestion for this would be a Moderator CP module so mods can maintain the sections/categories.