Support » Plugin: iThemes Security (formerly Better WP Security) » $wpdb->escape causing a NOTICE

  • My WP has define('WP_DEBUG', true). Updating WP to version 3.6 caused a NOTICE due to wpdb::escape being deprecated. According to performs weak escaping and esc_sql() was updated to do ‘real’ escaping”. I found occurrences of $wpdb->escape in secure.php and process.php . Is it safe for me to perform a search and replace changing $wpdb->escape to esc_sql() or $wpdb->prepare ?

    In addition: Today I just updated WP to version 3.6 and problems emerged. I believe some of them were caused by better-wp-security. I had to set define('WP_DEBUG', false) in order to complete the update.

Viewing 5 replies - 1 through 5 (of 5 total)
  • same here.

    This error is also triggered by the Broken Link Checker plugin …

    Confirming aluizioll‘s suspicions: the notice seems to be triggered by Better WP Security. Anyone found word from the developer as to a fix?

    Deactivated all plugins and found Better WP Security the source of the wpdb::escape notice. Running 3.6.



    Same here, I fixed replacing:

    $type = $wpdb->escape( $type );


    $type = esc_sql( $type );


    But as you said, not sure if is super safe.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘$wpdb->escape causing a NOTICE’ is closed to new replies.