From: Andrew Dolgov Date: Thu, 21 Mar 2013 17:45:00 +0000 (+0400) Subject: fix #2 for mysql escape string X-Git-Tag: 1.7.5~38 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=82ac5311549e41893d1430c5090a1d1a925c0c20;p=tt-rss.git fix #2 for mysql escape string --- diff --git a/include/db.php b/include/db.php index 17437142..0f4bf370 100644 --- a/include/db.php +++ b/include/db.php @@ -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); + } } }