Title: Use WP_DEBUG before update your plugin
Last modified: August 21, 2016

---

# Use WP_DEBUG before update your plugin

 *  Resolved [Sergej Müller](https://wordpress.org/support/users/sergejmueller/)
 * (@sergejmueller)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/use-wp_debug-before-update-your-plugin/)
 * The plugin creates several errors.
 * Please use WordPress _prepare_ [https://codex.wordpress.org/Class_Reference/wpdb#Protect_Queries_Against_SQL_Injection_Attacks](https://codex.wordpress.org/Class_Reference/wpdb#Protect_Queries_Against_SQL_Injection_Attacks)
   und WP_Error functions [https://codex.wordpress.org/Class_Reference/WP_Error](https://codex.wordpress.org/Class_Reference/WP_Error)
 * **Always** check your plugin with [https://codex.wordpress.org/WP_DEBUG](https://codex.wordpress.org/WP_DEBUG)
 * Error lines:
    Warning: mysql_real_escape_string() expects parameter 2 to be resource,
   object given in /www/htdocs/wp-content/plugins/wysija-newsletters/core/model.
   php on line 542
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * Warning: mysql_error() expects parameter 1 to be resource, object given in /www/
   htdocs/wp-content/plugins/wysija-newsletters/helpers/install.php on line 485
 * [https://wordpress.org/plugins/wysija-newsletters/](https://wordpress.org/plugins/wysija-newsletters/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [chris](https://wordpress.org/support/users/achensee/)
 * (@achensee)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/use-wp_debug-before-update-your-plugin/#post-4768500)
 * +1
 *  Moderator [Dominik Schilling](https://wordpress.org/support/users/ocean90/)
 * (@ocean90)
 * WordPress Core Developer
 * [12 years, 2 months ago](https://wordpress.org/support/topic/use-wp_debug-before-update-your-plugin/#post-4768504)
 * Note: With WordPress 3.9 and PHP 5.5 WordPress will use mysqli. You shouldn’t
   use any mysql_* functions directly. Use the [wpdb API](https://codex.wordpress.org/Class_Reference/wpdb)
   instead.
 *  [Ben](https://wordpress.org/support/users/benheu/)
 * (@benheu)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/use-wp_debug-before-update-your-plugin/#post-4768625)
 * Hi Sergej,
 * Thanks for the feedback, it’s always good to be reminded of the basics.
 * We actually write every single line of code with the WP_DEBUG on, it’s a rule
   in the team.
 * This being said, it’s difficult for us to reproduce all the possible environments
   our users are having. (server configurations, WordPress versions, plugins installed,
   themes installed etc etc…)
 * Anyway, I suppose that you’re using the version 3.9 of WordPress. Am I right?
   We’re actually preparing our code to be compatible with 3.9, it’s not yet ready
   but we’re getting there.
 * Let me know if I’m wrong, and please do share your current configuration with
   us.
 * Finally for a better and more intimate support, get in touch with us here:
    [http://support.mailpoet.com/feedback/](http://support.mailpoet.com/feedback/)
 * Cheers!
    Ben
 *  [Wysija](https://wordpress.org/support/users/wysija/)
 * (@wysija)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/use-wp_debug-before-update-your-plugin/#post-4768785)
 * Closing this… (we’re changing our code to be compliant with WP 3.9, don’t worry
   guys)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Use WP_DEBUG before update your plugin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wysija-newsletters_ffddcc.svg)
 * [MailPoet Newsletters (Previous)](https://wordpress.org/plugins/wysija-newsletters/)
 * [Support Threads](https://wordpress.org/support/plugin/wysija-newsletters/)
 * [Active Topics](https://wordpress.org/support/plugin/wysija-newsletters/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wysija-newsletters/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wysija-newsletters/reviews/)

 * 4 replies
 * 5 participants
 * Last reply from: [Wysija](https://wordpress.org/support/users/wysija/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/use-wp_debug-before-update-your-plugin/#post-4768785)
 * Status: resolved