• Resolved dougjoseph

    (@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:

    esc_sql

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

    (@anmari)

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

    Plugin Author anmari

    (@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!

    Thread Starter dougjoseph

    (@dougjoseph)

    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!

    Thread Starter dougjoseph

    (@dougjoseph)

    Thanks again.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Use of $wpdb->escape – Deprecated (listed in warning as wpdb::escape)’ is closed to new replies.