[buddypress-trac] [BuddyPress Trac] #6157: Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead.

buddypress-trac noreply at wordpress.org
Sun Feb 15 10:25:57 UTC 2015


#6157: Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare()
or esc_sql() instead.
-------------------------------------------+------------------
 Reporter:  spenser4551                    |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  low                            |   Milestone:  2.3
Component:  Component - Forums             |     Version:  1.1
 Severity:  major                          |  Resolution:
 Keywords:  needs-patch reporter-feedback  |
-------------------------------------------+------------------

Comment (by DJPaul):

 Our  `bbdb` class extends `wpdb`, and we implement `wpdb->escape_deep` --
 which calls `wpdb->escape` -> `_weak_escape` -> `addslashes` -- because
 old bbPress' original `bbdb` class had the method.

 `wpdb->escape`'s documentation says to use either `wpdb->prepare` or
 `esc_sql`. I agree that `esc_sql` is appropriate here.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6157#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list