mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-15 12:35:56 +00:00
pluginhost: save_data() fixes
This commit is contained in:
@@ -321,19 +321,18 @@ class PluginHost {
|
|||||||
if (!isset($this->storage[$plugin]))
|
if (!isset($this->storage[$plugin]))
|
||||||
$this->storage[$plugin] = array();
|
$this->storage[$plugin] = array();
|
||||||
|
|
||||||
$content = serialize($this->storage[$plugin],
|
$content = serialize($this->storage[$plugin]);
|
||||||
false);
|
|
||||||
|
|
||||||
if ($sth->fetch()) {
|
if ($sth->fetch()) {
|
||||||
$sth = $this->pdo->prepare("UPDATE ttrss_plugin_storage SET content = ?
|
$sth = $this->pdo->prepare("UPDATE ttrss_plugin_storage SET content = ?
|
||||||
WHERE owner_uid= ? AND name = ?");
|
WHERE owner_uid= ? AND name = ?");
|
||||||
$sth->execute([$content, $this->owner_uid, $plugin]);
|
$sth->execute([(string)$content, $this->owner_uid, $plugin]);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$sth = $this->pdo->prepare("INSERT INTO ttrss_plugin_storage
|
$sth = $this->pdo->prepare("INSERT INTO ttrss_plugin_storage
|
||||||
(name,owner_uid,content) VALUES
|
(name,owner_uid,content) VALUES
|
||||||
(?, ?, ?)");
|
(?, ?, ?)");
|
||||||
$sth->execute([$plugin, $this->owner_uid, $content]);
|
$sth->execute([$plugin, $this->owner_uid, (string)$content]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->pdo->commit();
|
$this->pdo->commit();
|
||||||
|
|||||||
Reference in New Issue
Block a user