[wp-trac] [WordPress Trac] #20223: simulate mysql_real_escape_string when not yet connected to DB
WordPress Trac
wp-trac at lists.automattic.com
Tue Mar 13 09:16:53 UTC 2012
#20223: simulate mysql_real_escape_string when not yet connected to DB
---------------------------+-----------------------------
Reporter: scottconnerly | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Database | Version: 3.3.1
Severity: normal | Keywords: needs-patch
---------------------------+-----------------------------
Currently wpdb::_real_escape() falls back to addslashes() when you're not
yet connected to the database
Instead, have it fall back to a closer mimic of
mysql_real_escape_string():
Use this to make patch:
http://pastebin.com/5vMaBhQe
Reference:
http://dev.mysql.com/doc/refman/5.0/en/mysql-real-escape-string.html
http://www.php.net/manual/en/function.mysql-real-escape-string.php
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20223>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list