aboutsummaryrefslogtreecommitdiff
path: root/app/Models/FeedDAO.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/FeedDAO.php')
-rw-r--r--app/Models/FeedDAO.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php
index e579f5881..7f00642f4 100644
--- a/app/Models/FeedDAO.php
+++ b/app/Models/FeedDAO.php
@@ -465,9 +465,15 @@ UPDATE `{$this->prefix}feed`
SQL;
$stm = $this->bd->prepare($sql);
if (!($stm && $stm->execute(array(':new_value' => FreshRSS_Feed::TTL_DEFAULT, ':old_value' => -2)))) {
+ $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo();
+ Minz_Log::error('SQL warning updateTTL 1: ' . $info[2] . ' ' . $sql);
+
$sql2 = 'ALTER TABLE `' . $this->prefix . 'feed` ADD COLUMN ttl INT NOT NULL DEFAULT ' . FreshRSS_Feed::TTL_DEFAULT; //v0.7.3
$stm = $this->bd->prepare($sql2);
- $stm->execute();
+ if (!($stm && $stm->execute())) {
+ $info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo();
+ Minz_Log::error('SQL error updateTTL 2: ' . $info[2] . ' ' . $sql2);
+ }
} else {
$stm->execute(array(':new_value' => -3600, ':old_value' => -1));
}