diff options
| author | 2023-03-04 13:30:45 +0100 | |
|---|---|---|
| committer | 2023-03-04 13:30:45 +0100 | |
| commit | b3239256dc6d188cda970adab516b3fcf1b86129 (patch) | |
| tree | d8e65dd9784834ba2e82ce7ee94b4718f8af19ea /app/Models/FeedDAO.php | |
| parent | 27b71ffa99f7dff013fb8d51d020ed628e0d2ce6 (diff) | |
| parent | 0fe0ce894cbad09757d719dd4b400b9862c1a12a (diff) | |
Merge branch 'edge' into latest
Diffstat (limited to 'app/Models/FeedDAO.php')
| -rw-r--r-- | app/Models/FeedDAO.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 5993f50dc..1aae5fee5 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -49,11 +49,11 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable { } $values = array( - substr($valuesTmp['url'], 0, 511), + $valuesTmp['url'], $valuesTmp['kind'] ?? FreshRSS_Feed::KIND_RSS, $valuesTmp['category'], mb_strcut(trim($valuesTmp['name']), 0, FreshRSS_DatabaseDAO::LENGTH_INDEX_UNICODE, 'UTF-8'), - substr($valuesTmp['website'], 0, 255), + $valuesTmp['website'], sanitizeHTML($valuesTmp['description'], '', 1023), $valuesTmp['lastUpdate'], isset($valuesTmp['priority']) ? intval($valuesTmp['priority']) : FreshRSS_Feed::PRIORITY_MAIN_STREAM, @@ -434,7 +434,7 @@ SQL; . '`cache_nbUnreads`=(SELECT COUNT(e2.id) FROM `_entry` e2 WHERE e2.id_feed=`_feed`.id AND e2.is_read=0)' . ($id != 0 ? ' WHERE id=:id' : ''); $stm = $this->pdo->prepare($sql); - if ($id != 0) { + if ($stm && $id != 0) { $stm->bindParam(':id', $id, PDO::PARAM_INT); } |
