Support » Plugin: amr users » Use of $wpdb->escape – Deprecated (listed in warning as wpdb::escape)

  • Resolved dougjoseph


    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:


    • This topic was modified 4 months, 4 weeks ago by dougjoseph.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author anmari


    Thanks for the headsup. Should have been picked up before (smh).

    Plugin Author anmari


    Hi Doug, well that was interesting. I like to make the notice show up (and it should have been because I work with debug etc on), and it wasn’t. I went down the rabbit hole of OMG why aren’t my notices showing, only to work out that that line of code doesn’t get called anymore and shouldn’t be there!

    I figured it was either that or perhaps some bit of backwards compatible code that should only be invoked in previous PHP versions. Thanks for such a great plugin!

    Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.