Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Use of $wpdb->escape – Deprecated (listed in warning as wpdb::escape)

$
0
0

Replies: 0

Hello, and thanks for such a great plugin! You are wonderfully appreciated!

When debugging is enabled, I get the following “notice”:

Notice: wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead. in ... /wp-includes/functions.php on line 4442

Now that page’s code does not have the issue, just reports that it was encountered.

When I ran a search of the plugins folder…

grep -ri 'wpdb->escape' *

It tells what plugins have the deprecated code. One of those listed is AMR Users.

Specifically, this page: ameta-cache.php

…On line 182:

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

The fix is to replace $wpdb->escape with this:

esc_sql

  • This topic was modified 34 minutes ago by dougjoseph.

Viewing all articles
Browse latest Browse all 59525

Trending Articles