Site logo

Archived topic

Foreach errors shows in Dashboard

15 replies · Started by Rodrigo on March 27, 2018

Viewing posts 1–15 of 16

Hello Tom & Leo,

I get the following error messages from time to time:


Warning: Invalid argument supplied for foreach() in /home/dh_8kfwgz/domain.com/wp-content/plugins/gp-premium/sites/sites.php on line 338

Warning: Invalid argument supplied for foreach() in /home/dh_8kfwgz/domain.com/wp-content/plugins/gp-premium/sites/sites.php on line 365

Warning: Cannot modify header information - headers already sent by (output started at /home/dh_8kfwgz/domain.com/wp-content/plugins/gp-premium/sites/sites.php:338) in /home/dh_8kfwgz/domain.com/wp-admin/includes/misc.php on line 1114

I can see you have already some other posts on this topic. They have vanished for the moment but I'm worried if that will break my site.

I am having the same problem :(

I am having the same problem 🙁

Me too:
Operating System: Linux
Software: Apache/2
MySQL version: 5.6.27
PHP Version: 7.0.17
PHP Max Input Vars: 1000
PHP Max Post Size: 64M
GD Installed: Yes
Write Permissions: All right

Our Sites server is currently under DDoS attack. We're working on a fix.

Sorry!

Hi Tom,
That sucks.. Good luck fixing this!

Hello,

I was experiencing the same problem thus I added these checks in /plugins/gp-premium/sites/sites.php

On line 339 immediately after:

$data = json_decode( wp_remote_retrieve_body( $data ), true );

$data = is_array($data) ? $data : array();

On line 365 immediately after:

$trusted_authors = json_decode( wp_remote_retrieve_body( $trusted_authors ), true );

$trusted_authors['trusted_author'] = is_array( $trusted_authors['trusted_author']) ? $trusted_authors['trusted_author'] : array();

So now if there is no connection to gp servers, there is no error also...

I'm having the same issue. I just did an update to one of my websites, and it is NOT WORKING WELL.
I'm reverting website to a back up copy. Will this help? Or does it mean all other website will be affected (updates or not)? Soooo concerning....

If you go to "Appearance > GeneratePress > Site Library" and click "Refresh Sites", the error should go away now.

Let me know - sorry for the inconvenience!

Hi Tom. I can't see the errors, but my site is not the same. Notice the end of the front page, it's showing a nav menu! I haven't added any of that. What should I do?
https://www.soulspace.com.au/

Any chance you can open a new topic, just so we keep this one focused?

Thanks!

yes, I am. I can also see Facebook plug in is gone.
I can see the error now:

ent supplied for foreach() in /home/soulspac/public_html/wp-content/plugins/gp-premium/sites/sites.php on line 338

Warning: Invalid argument supplied for foreach() in /home/soulspac/public_html/wp-content/plugins/gp-premium/sites/sites.php on line 365

Ok, will create a new topic.

This archived topic is closed to new replies.