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?
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.
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.
Support forum for Event Espresso 3 and Event Espresso 4.