]> git.mxchange.org Git - friendica.git/commitdiff
Add feedback / revert fix for $item['post-type']
authorPhilipp <admin@philipp.info>
Wed, 15 Sep 2021 06:48:41 +0000 (08:48 +0200)
committerPhilipp <admin@philipp.info>
Sat, 18 Sep 2021 10:51:09 +0000 (12:51 +0200)
src/Database/Database.php
src/Model/Item.php

index e4a4a0f571bf4bd0efb0f0c5adcb08872a658d9f..a93d4e610bb69f18d48044a9a78a86b35250decb 100644 (file)
@@ -1465,8 +1465,7 @@ class Database
                        $this->logger->notice('Invalid count.', ['table' => $table, 'expression' => $expression, 'condition' => $condition_string, 'callstack' => System::callstack()]);
                        return 0;
                } else {
-                       // Ensure to always return either a "null" or a numeric value
-                       return is_numeric($row['count']) ? (int)$row['count'] : $row['count'];
+                       return (int)$row['count'];
                }
        }
 
index 83cbcbb01a4b97264debe7b6b1dd0a731c65341b..8327252abc7acc2f69bb062cb732e06884edd2e9 100644 (file)
@@ -2259,7 +2259,7 @@ class Item
                $condition[0] .= " AND `received` < UTC_TIMESTAMP() - INTERVAL ? DAY";
                $condition[] = $days;
 
-               $items = Post::select(['resource-id', 'starred', 'id', 'post-type', 'uid', 'uri-id', 'post-type'], $condition);
+               $items = Post::select(['resource-id', 'starred', 'id', 'post-type', 'uid', 'uri-id'], $condition);
 
                if (!DBA::isResult($items)) {
                        return;