fix #2 for mysql escape string
This commit is contained in:
parent
0295919648
commit
82ac531154
1 changed files with 5 additions and 1 deletions
|
@ -51,7 +51,11 @@ function db_escape_string($s, $strip_tags = true, $link = NULL) {
|
|||
return pg_escape_string($s);
|
||||
}
|
||||
} else {
|
||||
return mysql_real_escape_string($s, $link);
|
||||
if ($link) {
|
||||
return mysql_real_escape_string($s, $link);
|
||||
} else {
|
||||
return mysql_real_escape_string($s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue