Opened 14 years ago
Closed 13 years ago
#20223 closed enhancement (invalid)
simulate mysql_real_escape_string when not yet connected to DB
| Reported by: | scottconnerly | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Database | Version: | 3.3.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
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
Attachments (2)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Better replacement for mysql_real_escape_string