Skip to content
Snippets Groups Projects
Commit f8108cc2 authored by Andrew Dolgov's avatar Andrew Dolgov
Browse files

pluginhost: save_data() fixes

parent 8af94f12
No related branches found
No related tags found
No related merge requests found
......@@ -321,19 +321,18 @@ class PluginHost {
if (!isset($this->storage[$plugin]))
$this->storage[$plugin] = array();
$content = serialize($this->storage[$plugin],
false);
$content = serialize($this->storage[$plugin]);
if ($sth->fetch()) {
$sth = $this->pdo->prepare("UPDATE ttrss_plugin_storage SET content = ?
WHERE owner_uid= ? AND name = ?");
$sth->execute([$content, $this->owner_uid, $plugin]);
$sth->execute([(string)$content, $this->owner_uid, $plugin]);
} else {
$sth = $this->pdo->prepare("INSERT INTO ttrss_plugin_storage
(name,owner_uid,content) VALUES
(?, ?, ?)");
$sth->execute([$plugin, $this->owner_uid, $content]);
$sth->execute([$plugin, $this->owner_uid, (string)$content]);
}
$this->pdo->commit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment