Support

Home Forums Event Espresso Premium Warning: Missing argument 2 for wpdb::prepare(), called in /home/…

Warning: Missing argument 2 for wpdb::prepare(), called in /home/…

Posted: March 19, 2015 at 4:00 pm

Viewing 5 reply threads


sideways8

March 19, 2015 at 4:00 pm

Hi, I am using EE3 (downloaded an hour ago, after purchasing a renewal) and updated all plugins and themes. I’m getting this error when I update an event:

Warning: Missing argument 2 for wpdb::prepare(), called in /home/********/public_html/wp-content/plugins/event-espresso/includes/event-management/update_event.php on line 352 and defined in /home/********/public_html/wp-includes/wp-db.php on line 1152

I have removed any template file that might have been in /wp-content/uploads/espresso.

Suggestions?


Lorenzo Orlando Caum

  • Support Staff

March 19, 2015 at 4:16 pm

Hi Adam, WP Debugging with Debug Display may be currently on. Try turning it off on your live site by updating the debug macro in your wp-config.php file:

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


Lorenzo


sideways8

March 20, 2015 at 7:21 am

I dropped that into wp-config.php but still getting the errors.


Tony

  • Support Staff

March 20, 2015 at 7:39 am

Hi Adam,

If the warnings are still being displayed it means your server is set to display_errors, this is great for debugging, not so great for live.

You can disable this by adding:

@ini_set( 'display_errors', 0 );

So something like this:

define( 'WP_DEBUG', true ); // Or false
if ( WP_DEBUG ) {
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );
}

Will log the errors and prevent them from being displayed.


sideways8

March 20, 2015 at 9:20 am

Thanks. That “fixed” it.

Is there a plan for correcting the code so it passes the correct number of arguments?


Tony

  • Support Staff

March 20, 2015 at 9:50 am

Hi Adam,

Can you go to Dashboard -> Plugins and tell me the exact version number of Event Espresso you are using please.

It may also be displayed at the bottom of the Dashboard.

Viewing 5 reply threads

The support post ‘Warning: Missing argument 2 for wpdb::prepare(), called in /home/…’ 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