]> git.wh0rd.org - tt-rss.git/commitdiff
pluginhost: save_data() fixes
authorAndrew Dolgov <noreply@fakecake.org>
Sat, 2 Dec 2017 08:31:02 +0000 (11:31 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Sat, 2 Dec 2017 08:31:02 +0000 (11:31 +0300)
classes/pluginhost.php

index bff7c32d0b5ea3f69ee145ec06e750fac69b57b6..561a10a41d15b3a66151bbee0955873e4ad60099 100644 (file)
@@ -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();