diff --git a/classes/pluginhost.php b/classes/pluginhost.php index 9ac1789f5..53adf01f9 100644 --- a/classes/pluginhost.php +++ b/classes/pluginhost.php @@ -274,7 +274,8 @@ class PluginHost { if (!isset($this->storage[$plugin])) $this->storage[$plugin] = array(); - $content = $this->dbh->escape_string(serialize($this->storage[$plugin])); + $content = $this->dbh->escape_string(serialize($this->storage[$plugin]), + false); if ($this->dbh->num_rows($result) != 0) { $this->dbh->query("UPDATE ttrss_plugin_storage SET content = '$content' diff --git a/include/functions.php b/include/functions.php index 7db040d04..01ffa751f 100644 --- a/include/functions.php +++ b/include/functions.php @@ -961,7 +961,7 @@ } function file_is_locked($filename) { - if (function_exists('flock')) { + if (function_exists('flock') && file_exists(LOCK_DIRECTORY . "/$filename")) { $fp = @fopen(LOCK_DIRECTORY . "/$filename", "r"); if ($fp) { if (flock($fp, LOCK_EX | LOCK_NB)) { diff --git a/js/viewfeed.js b/js/viewfeed.js index 095bfab22..005e0758c 100644 --- a/js/viewfeed.js +++ b/js/viewfeed.js @@ -590,7 +590,7 @@ function moveToPost(mode, noscroll, noexpand) { if (!getInitParam("cdm_expanded")) { - if (!noscroll && article.offsetTop < ctr.scrollTop) { + if (!noscroll && article && article.offsetTop < ctr.scrollTop) { scrollArticle(-ctr.offsetHeight/4); } else { cdmExpandArticle(prev_id, noexpand);