diff options
| author | 2018-12-22 13:22:20 +0100 | |
|---|---|---|
| committer | 2018-12-22 13:22:20 +0100 | |
| commit | f0a359619fa2936d66a2b96dd086d4686e7405fa (patch) | |
| tree | ddad42a7f6813bd458f39d5203d083daad4cc1c5 /app/Models/FeedDAO.php | |
| parent | e04804d0f67dd43fd3f072b9a127768ee7b7b56c (diff) | |
| parent | 4a1a852f457d52fa47191e3f7e3e9073e1324cd9 (diff) | |
Merge pull request #2186 from FreshRSS/dev1.13.0
FreshRSS 1.13.0
Diffstat (limited to 'app/Models/FeedDAO.php')
| -rw-r--r-- | app/Models/FeedDAO.php | 8 |
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)); } |
