Ticket #1394: db.diff
| File db.diff, 667 bytes (added by auroraeosrose, 8 years ago) |
|---|
-
wp-db.php
76 76 // ==================================================================== 77 77 // Format a string correctly for safe insert under all PHP conditions 78 78 79 function escape($str) { 80 return addslashes($str); 79 function escape ($string) { 80 if(!$this->dbh || version_compare(phpversion(),'4.3.0')=='-1') { 81 return mysql_escape_string($string); 82 } else { 83 return mysql_real_escape_string($string, $this->dbh); 84 } 81 85 } 82 86 83 87 // ==================================================================
