Support

Home Forums Event Espresso Premium PHP Warnings When Adding Event EE4

PHP Warnings When Adding Event EE4

Posted: April 10, 2014 at 6:00 am


Josiah Cole

April 10, 2014 at 6:00 am

Testing EE4 on a new WP install with no other plugins. Installed ok and was able to click around. When I attempted to add my first event, got the following PHP warnings:

Warning: Invalid argument supplied for foreach() in /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php on line 141

Warning: array_keys() [function.array-keys]: The first argument should be an array in /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php on line 189

Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php on line 189

Warning: Invalid argument supplied for foreach() in /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php on line 190

Warning: Invalid argument supplied for foreach() in /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php on line 231

Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php:141) in /home/username/public_html/dev/wp-admin/post.php on line 233

Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php:141) in /home/username/public_html/dev/wp-includes/pluggable.php on line 896

EE did warn me that I was running 5.2.17 and 5.3 is recommended. Is this the explanation behind these warnings?


Dean

April 10, 2014 at 6:36 am

Hi,

Are you using a Windows IIS server?


Josiah Cole

April 10, 2014 at 6:51 am

Nope, standard shared linux hosting at HostGator.

New WP install, no plugins (besides Akismet), default theme.


Tony

  • Support Staff

April 10, 2014 at 7:04 am

Hi Josiah,

At the top of that event is there an error message regarding Drafts?

When creating this event did you add a Title/Description before publishing?


Josiah Cole

April 10, 2014 at 7:17 am

No draft errors/warnings, but I can’t preview the post either (get page not found)

And yes I entered just a title and description before attempting to publish, nothing else.

Just noticed on the event edit screen I see the following warnings in the Event Tickets & Datetimes section:

Warning: Invalid argument supplied for foreach() in /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php on line 662

Warning: Invalid argument supplied for foreach() in /home/username/public_html/dev/wp-content/plugins/event-espresso/caffeinated/admin/new/pricing/espresso_events_Pricing_Hooks.class.php on line 1027


Tony

  • Support Staff

April 10, 2014 at 7:27 am

As this is a fresh install I would start by updating the PHP version.

You can usually do this via cPanel.

Often you’ll find something like this http://take.ms/6ZCIS

Which will take you to something like http://take.ms/Lethp

You can then set your PHP version, although it may be different on your Host.

Currently I’m not sure if this is causing your issue, however would still recommend updating.


Josiah Cole

April 10, 2014 at 7:53 am

I added an instruction within my “dev” directory to use PHP 5.3 using htaccess.

Explained here: https://support.hostgator.com/articles/hosting-guide/hardware-software/php-5-3#shared/reseller

Still seeing the same warning/error when attempting to publish. Any other ideas?


Lorenzo Orlando Caum

  • Support Staff

April 10, 2014 at 11:46 am

Hello,

Please try reinstalling your software.

Backup your WordPress and download new copy of Event Espresso from your account page.

Then deactivate and remove the existing version and upload and install the new copy through WordPress admin –> Plugins.


Lorenzo


Josiah Cole

April 11, 2014 at 8:50 am

Oddly, that seems to have fixed my problem.

I deactivated, deleted and then re-downloaded, uploaded and activated EE4.

I then created a new event and was able to publish. The difference being that the new event did have dates assigned, whereas the old test event did not (most likely due to the errors present on Event Tickets & Datetimes)

I’ll keep you posted if I see any other issues.

The support post ‘PHP Warnings When Adding Event EE4’ 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