]> git.wh0rd.org Git - tt-rss.git/commitdiff
update_rss_feed: escape error string immediately
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 24 Dec 2012 10:17:24 +0000 (14:17 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 24 Dec 2012 10:17:24 +0000 (14:17 +0400)
include/rssfuncs.php

index 817490a84ba99b96387366198946b44c6f174d2d..fb2f35272ad15ad8fe53eb290dff00fa429cb274 100644 (file)
 
                } 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'");