Support

Home Forums Event Espresso Premium PHP warning on every page

PHP warning on every page

Posted: November 5, 2014 at 3:46 am

Viewing 5 reply threads


Sam Hastings

November 5, 2014 at 3:46 am

I’m using WP 4.0 and EE 4.3.3.p, and am receiving the following PHP warning at the top of every page:

Warning: Invalid argument supplied for foreach() in /Users/sam/Sites/all-aboard/wp-content/plugins/event-espresso-core-reg/core/EE_Config.core.php on line 201

I tried Googling the warning but it doesn’t seem like it’s been documented anywhere.

Anyone got any idea what the cause is, and how to fix?

Thanks!


Tony

  • Support Staff

November 5, 2014 at 4:23 am

Hi Sam,

We have not release a version 4.3.3.p of Event Espresso, can you confirm if that is a typo please?

Is that the full error message?


Sam Hastings

November 5, 2014 at 4:27 am

Sorry Tony, didn’t realise I’d made a typo there: I meant to say 4.4.3.p.

This is indeed the full error message – I did a bit of digging around and it looked the EE settings had not copied across when I moved the site from the live to my local environment.

As a quick fix I put the following code at the top of my functions.php to re-initialise EE’s settings and then re-entered them in admin.

update_option('ee_config', array());

Any idea why exporting the MySQL database on one server and importing it locally would cause me to lose all my EE settings? Just spoke to a colleague and he said he had the exact same problem recently.


Tony

  • Support Staff

November 5, 2014 at 4:29 am

Are you simply just exporting the database tables and then importing them locally?


Sam Hastings

November 5, 2014 at 4:30 am

Yep, that’s exactly what I’ve done. Did I miss anything?


Tony

  • Support Staff

November 5, 2014 at 4:51 am

With WordPress you can not simply export the live data and import locally. See here:

http://codex.wordpress.org/Moving_WordPress#Changing_Your_Domain_Name_and_URLs

How are you changing the database urls to the local site? If that is not done correctly you will break any serialized data within the database.

You can update those urls manually using the scrip in the link above, or using a plugin such as WP Migrate DB although there are plenty of options, most backup plugins offer safe/advanced search and replace now.

Other options include using a plugin such as Duplicator to do all of this for you, you simple ‘install’ the package it creates of the live site locally and it will work everything out for you.

Viewing 5 reply threads

The support post ‘PHP warning on every page’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso