Support

Home Forums Event Espresso Premium cart.php error: array_key_exists()

cart.php error: array_key_exists()

Posted: December 11, 2014 at 10:35 am

Viewing 7 reply threads


Aneleise Ruggles

December 11, 2014 at 10:35 am

Users are getting this error when checking out:

“Warning: array_key_exists() expects parameter 2 to be array, string given in /home/arsenalarts321/public_html/wp-content/plugins/event-espresso/includes/functions/cart.php on line 250”

(Screenshot here: https://www.dropbox.com/s/fsxszjbh40awvsj/Screen%20Shot%202014-12-03%20at%209.59.33%20AM.png?dl=0)

Do you have any insight on what might be causing this? The error doesn’t seem to be affecting our checkout/registration for users, it’s just that this warning pops up on the checkout page.

(Copy of our cart.php file here: https://www.dropbox.com/s/q0z5xzoe4somnhe/cart.php?dl=0)

Let me know – thanks!


Lorenzo Orlando Caum

  • Support Staff

December 11, 2014 at 12:22 pm

Hi,

Are you running the latest version of Event Espresso 3?

https://eventespresso.com/wiki/change-log/

Please also turn off WordPress debugging as this is a live or production site. The following macro can be added to your wp-config.php file and should replace and existing debugging macros.

https://gist.github.com/lorenzocaum/848801a1173be464fbe7#comment-1239850


Lorenzo


Aneleise Ruggles

December 11, 2014 at 1:15 pm

Hi Lorenzo – We’re running EE 3.1.36.4. Debugging on wp-config.php is disabled.


Dean

December 12, 2014 at 12:15 am

Hi,

The first thing I would test is to rename the espresso directory found in wp-content/uploads/ via FTP or your hosts file manager.

This will DISABLE all of your modified files, forcing the plugin to use the defaults. As such you may wish to put the site into maintenance mode (I’m not sure what modifications you have made or how they affect your site, so maintenance mode may or may not be necessary).

Once the plugin is using the default templates, test the registration again and see if the error occurs.


Aneleise Ruggles

December 12, 2014 at 9:24 am

Thanks, I renamed the uploads directory and noticed that it reverted to defaults, but the error was still there.


Josh

  • Support Staff

December 12, 2014 at 10:26 am

Hi Kimberly,

Can you try adding this to your wp-config.php file?

@ini_set( 'display_errors', 0 );

It can be added before the line where it says That’s all, stop editing!


Aneleise Ruggles

December 12, 2014 at 10:47 am

Josh! That did the trick. Thank you!


Josh

  • Support Staff

December 12, 2014 at 11:11 am

You’re welcome.

Viewing 7 reply threads

The support post ‘cart.php error: array_key_exists()’ 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