From: Andrew Dolgov Date: Mon, 24 Dec 2012 10:17:24 +0000 (+0400) Subject: update_rss_feed: escape error string immediately X-Git-Tag: 1.7.0~140 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=356a991a7bfac731dc63d3ce29ccd050143fbebf;p=tt-rss.git update_rss_feed: escape error string immediately --- diff --git a/include/rssfuncs.php b/include/rssfuncs.php index 817490a8..fb2f3527 100644 --- a/include/rssfuncs.php +++ b/include/rssfuncs.php @@ -1017,14 +1017,12 @@ } else { - $error_msg = mb_substr($rss->error(), 0, 250); + $error_msg = db_escape_string(mb_substr($rss->error(), 0, 250)); if ($debug_enabled) { _debug("update_rss_feed: error fetching feed: $error_msg"); } - $error_msg = db_escape_string($error_msg); - db_query($link, "UPDATE ttrss_feeds SET last_error = '$error_msg', last_updated = NOW() WHERE id = '$feed'");