[wp-trac] [WordPress Trac] #27466: WordPress 3.9 issue - database connection lost on mysql_real_escape_string() / AJAX?
WordPress Trac
noreply at wordpress.org
Thu Mar 20 21:07:54 UTC 2014
#27466: WordPress 3.9 issue - database connection lost on
mysql_real_escape_string() / AJAX?
--------------------------+----------------------
Reporter: harmr | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Query | Version:
Severity: normal | Resolution: invalid
Keywords: | Focuses:
--------------------------+----------------------
Changes (by ocean90):
* status: new => closed
* version: trunk =>
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
You shouldn't use mysql_real_escape_string() directly. Use
$wpdb->prepare() instead.
$wpdb now uses mysqli if available (#21663), means there is no MySQL
instance, which is required by mysql_real_escape_string() (see PHP docs).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27466#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list