Invalid Argument Supplied For Foreach Wordpress Error
for foreach() errors [Resolved] Invalid argument supplied for foreach() errors Peter Hardy-vanDoorn @petervandoorn 10 months, 3 weeks ago Since updating to the latest version I'm seeing this error, but only on the backend: Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/advanced-access-manager/Application/Backend/Extension.php on line 87 and also on line 169 when viewing /admin.php?page=aam https://wordpress.org/plugins/advanced-access-manager/ Viewing 9 replies - 1 through 9 (of 9 total) Plugin Author Vasyltech @vasyl_m 10 months, 3 weeks ago Hi Peter, Thank you for your feedback. That is kind of a weird warning, considering the fact that on the line 87 there is no foreach loop. Please try to install AAM Utilities extension and clear all settings. This might help you to avoid the second warning. Keep us updated. Regards, Vasyl Peter Hardy-vanDoorn @petervandoorn 10 months, 3 weeks ago I had thought to try the Utilities extension, but unfortunately the 2 errors completely break all AAM functionality, so the Download button doesn't work! I have also already tried deleting the plugin files and reinstalling via FTP, but I don't really want to try deleting it through WP as I don't really want to delete the extensive user role settings! Plugin Author Vasyltech @vasyl_m 10 months, 3 weeks ago Hi Peter, As a quick fix, you might try to go to database and remove the option aam-extension-list in your wp_options table. The permanent fix is coming with our new release AAM 3.0.4 in couple days. Thank you for your feedback and let me know if this works for you. Regards, Vasyl Studiobovenkamer @studiobovenkamer 8 months, 3 weeks ago Hi Vasyl, Was this problem resolved? I'm running 3.0.9 and get the same warning: Warning: Invalid argument supplied for foreach() in ../wp-content/plugins/advanced-access-manager/Application/Backend/Manager.php on line 87. Warning: Invalid argument supplied for foreach() in ../wp-content/plugins/advanced-access-manager/Application/Backend/Extension.php on line 180 When visiting the AAM page in the admin I also get three alert pop-ups, all with the same warning: DataTables warning: table id=role-list - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1 Opening the extension tab, there one more warning: Warning: Invalid argument supplied for foreach() in ../wp-content/plugins/advanced-access-manager/Application/Core/Repository.ph
supplied for foreach() in… [Resolved] Warning: Invalid argument supplied for foreach() in… Christi @christini 10 months, 3 weeks ago Hi, Having the same issue a couple of other people have reported. Instead of images showing on the site, we see an error: Warning: Invalid argument supplied for foreach() in… …wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/library/enjoyinstagram_shortcode.php on line 66 Link to the site (in development): http://dogandboy.com/main/ We have confirmed that the Instagram account is set to public, and the profile is linked in the plugin settings in the dashboard. We did https://wordpress.org/support/topic/invalid-argument-supplied-for-foreach-errors/ initial troubleshooting of disabling all other plugins and switching to a default theme, but the issue still occurs. Please advise of any additional troubleshooting steps we can take to resolve this error. Thanks! https://wordpress.org/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/ Viewing 9 replies - 1 through 9 (of 9 total) monstertaco @monstertaco 10 months, 3 weeks ago Same here, I'm trying to https://wordpress.org/support/topic/warning-invalid-argument-supplied-for-foreach-in-10/ install on a client's site and getting the same error. I've used this before with no problems. esmi @esmi Forum Moderator 10 months, 3 weeks ago @monstertaco: If you require assistance then, as per the Forum Welcome, please post your own topic. monstertaco @monstertaco 10 months, 3 weeks ago You'd rather have a bunch of threads started for the same reason? That makes no sense but that's fine. esmi @esmi Forum Moderator 10 months, 3 weeks ago You'd rather have a bunch of threads started for the same reason? Yes. That's exactly what we would prefer, thanks. monstertaco @monstertaco 10 months, 3 weeks ago Nah, I'll just wait for the update. Looks like it's gonna be a widespread problem, thanks anyyay. Plugin Author mediabeta @mediabeta 10 months, 2 weeks ago Please read https://wordpress.org/support/topic/invalid-argument-supplied-10?replies=10 Christi @christini 10 months, 2 weeks ago For now, we're going to use Snapwidget instead. Client is anxious to launch site and with no ETA on a fix for this, this was the best
[Resolved] Invalid argument supplied tupacan @tupacan 11 months ago Hello, I got an error saying Warning: Invalid argument supplied for foreach() in /home/www/mywebsite.com/htdocs/wp-content/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/library/enjoyinstagram_shortcode_grid.php on line 30 Any idea how to make this work? Thanks in advance. https://wordpress.org/plugins/enjoy-instagram-instagram-responsive-images-gallery-and-carousel/ Viewing https://wordpress.org/support/topic/invalid-argument-supplied-10/ 15 replies - 1 through 15 (of 19 total) 1 2 → Akexis @akexis http://stackoverflow.com/questions/6572061/php-warning-invalid-argument-supplied-for-foreach 11 months ago It seems to be because no images have been moderated yet. Help and Support The video on the bottom of this page shows how to moderate. Once you have selected some images to pull into the feed, the invalid argument warning should go away. Currently my moderation panel isn't pulling invalid argument from the Instagram account and I'm trying to troubleshoot, so I can't confirm this, but it's a strong suspicion. tupacan @tupacan 11 months ago Thanks for your respond. I don't think that is the problem. The moderation is only for Premium, but I wan't to use it only the free version. I just need to show my Instagram pictures on a wordpress page. Any idea? Jacob invalid argument supplied Peattie @jakept 11 months ago Looks like Instagram has killed API access to the feed: http://developers.instagram.com/post/133424514006/instagram-platform-update I don't think you'll be able to fix it. Plugin Author mediabeta @mediabeta 11 months ago @jakept we are just studying about this news and if it will be necessary we will develop an update for our plugin. In this moment our plugin works correctly. @tupacan is your instagram account private? tupacan @tupacan 11 months ago No, the account privacy is set to public. I tried with few Instagram accounts. Any other idea? Thanks. rhcp_mdq @rhcp_mdq 10 months, 4 weeks ago Hey guys! Same problem here. Profile privacy is set to public too. Any update? Thanks! monstertaco @monstertaco 10 months, 3 weeks ago Same problem here, Instagram seems to have changed it's sandbox/api permissions. I've used this on several client's sites and this is the first time this has happened. I know there's plenty of other instagram feed plugins out there but this is my favorite, please find a fix asap. My client's instagram is also public. Jacob Peattie @jakept 10 months, 3 weeks ago It really does look like the API is the issue. @mediabeta Are you certain the plugin should
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up PHP Warning: Invalid argument supplied for foreach() up vote 20 down vote favorite 5 Why am I getting this PHP Warning? Invalid argument supplied for foreach() Here is my code: // look for text file for this keyword if (empty($site["textdirectory"])) { $site["textdirectory"] = "text"; } if (file_exists(ROOT_DIR.$site["textdirectory"].'/'.urlencode($q).'.txt')) { $keywordtext = file_get_contents(ROOT_DIR.$site["textdirectory"].'/'.urlencode($q).'.txt'); } else { $keywordtext = null; } $keywordsXML = getEbayKeywords($q); foreach($keywordsXML->PopularSearchResult as $item) { $topicsString = $item->AlternativeSearches; $relatedString = $item->RelatedSearches; if (!empty($topicsString)) { $topics = split(";",$topicsString); } if (!empty($relatedString)) { $related = split(";",$relatedString); } } $node = array(); $node['keywords'] = $q; 2 $xml = ebay_rss($node); $ebayItems = array(); $totalItems = count($xml->channel->item); $totalPages = $totalItems / $pageSize; $i = 0; foreach ($xml->channel->item as $item) { $ebayRss = $item->children('http://www.ebay.com/marketplace/search/v1/services'); if ($i>=($pageSize*($page-1)) && $i<($pageSize*$page)) { $newItem = array(); $newItem['title'] = $item->title; $newItem['link'] = buyLink($item->link, $q); $newItem['image'] = ebay_stripImage($item->description); $newItem['currentbid'] = ebay_convertPrice($item->description); $newItem['bidcount'] = $ebayRss->BidCount; $newItem['endtime'] = ebay_convertTime