]> git.mxchange.org Git - friendica.git/blobdiff - src/Database/Database.php
Merge pull request #10796 from MrPetovan/task/10754-add-revoke-function
[friendica.git] / src / Database / Database.php
index e4a4a0f571bf4bd0efb0f0c5adcb08872a658d9f..28283b1c8175d8273d980c0ffe17b021b8074cdc 100644 (file)
@@ -1462,11 +1462,10 @@ class Database
                $row = $this->fetchFirst($sql, $condition);
 
                if (!isset($row['count'])) {
-                       $this->logger->notice('Invalid count.', ['table' => $table, 'expression' => $expression, 'condition' => $condition_string, 'callstack' => System::callstack()]);
+                       $this->logger->notice('Invalid count.', ['table' => $table, 'row' => $row, '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'];
                }
        }