Static Page Problem: Invalid argument supplied for foreach()

Found a bug? Tell us!!
Post Reply
slash1968
Posts: 1
Joined: Mon Sep 05, 2011 12:19 am

Static Page Problem: Invalid argument supplied for foreach()

Post by slash1968 »

Hi can somebody help me with this?
I downloaded the static page event at the plugins section.

Then I installed the plugin after that ,, a message appeared at the bottom of the site

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\serendipity\plugins\serendipity_event_staticpage\serendipity_event_staticpage\serendipity_event_staticpage.php on line 2718


What I am going to do with this?

...
And there is also a damage in the file when I downloaded it and extracted it . I think its not completed yet
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Static Page Problem: Invalid argument supplied for forea

Post by Timbalu »

Yeah, it looks like the foreach needs to be surrounded by this, if you do not have static pages in the database by now.

Code: Select all

if(is_array($pages)) {
      foreach......
}
Do it yourself or wait for an updated version
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply