php notice related to wpdb::escape in 404.php
-
wpdb::escape method is deprecated since 3.6
In 404.php:10 replace
$search_term_q = esc_js( $wpdb->escape( urlencode( strip_tags( $search_term ) ) ) );
I got it to work by using this:
$search_term_q = esc_js( esc_sql( urlencode( strip_tags( $search_term ) ), $search_term ) );
- The topic ‘php notice related to wpdb::escape in 404.php’ is closed to new replies.