aboutsummaryrefslogtreecommitdiff
path: root/app/Models/TagDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-26 16:03:29 +0100
committerGravatar GitHub <noreply@github.com> 2019-01-26 16:03:29 +0100
commit8dcdde6251ae4dfc690b1a014488df125c5e5cdc (patch)
treef5762ac9c76acf708a50534f081e558489ccad86 /app/Models/TagDAO.php
parentf0a359619fa2936d66a2b96dd086d4686e7405fa (diff)
parent38e8e265e0f2ead830aa12e7ef81de12599405b5 (diff)
Merge pull request #2220 from FreshRSS/dev1.13.1
FreshRSS 1.13.1
Diffstat (limited to 'app/Models/TagDAO.php')
-rw-r--r--app/Models/TagDAO.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/app/Models/TagDAO.php b/app/Models/TagDAO.php
index b55d2b35d..dba854aa4 100644
--- a/app/Models/TagDAO.php
+++ b/app/Models/TagDAO.php
@@ -265,8 +265,18 @@ class FreshRSS_TagDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
$values = array();
if (is_array($entries) && count($entries) > 0) {
$sql .= ' AND et.id_entry IN (' . str_repeat('?,', count($entries) - 1). '?)';
- foreach ($entries as $entry) {
- $values[] = is_array($entry) ? $entry['id'] : $entry->id();
+ if (is_array($entries[0])) {
+ foreach ($entries as $entry) {
+ $values[] = $entry['id'];
+ }
+ } elseif (is_object($entries[0])) {
+ foreach ($entries as $entry) {
+ $values[] = $entry->id();
+ }
+ } else {
+ foreach ($entries as $entry) {
+ $values[] = $entry;
+ }
}
}
$stm = $this->bd->prepare($sql);