diff options
| author | 2019-11-04 18:13:13 +0100 | |
|---|---|---|
| committer | 2019-11-04 18:13:13 +0100 | |
| commit | 122e4b412a29c90ec69c2a3fb68b6d8b2b3df5c7 (patch) | |
| tree | b693763f8c86573545cff41ca5951e5945b7f1e6 /app | |
| parent | 2495172a05725684fa4db2ed3417461d386c5cbf (diff) | |
Fix PostgreSQL size bug for uppercase (#2631)
Crash for users with uppercase letters
Diffstat (limited to 'app')
| -rw-r--r-- | app/Models/DatabaseDAOPGSQL.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/app/Models/DatabaseDAOPGSQL.php b/app/Models/DatabaseDAOPGSQL.php index 1a6b3599e..7ca7799ae 100644 --- a/app/Models/DatabaseDAOPGSQL.php +++ b/app/Models/DatabaseDAOPGSQL.php @@ -58,14 +58,17 @@ class FreshRSS_DatabaseDAOPGSQL extends FreshRSS_DatabaseDAOSQLite { $stm->execute(); } else { $sql = "SELECT " - . "pg_total_relation_size('{$this->pdo->prefix()}category') + " - . "pg_total_relation_size('{$this->pdo->prefix()}feed') + " - . "pg_total_relation_size('{$this->pdo->prefix()}entry') + " - . "pg_total_relation_size('{$this->pdo->prefix()}entrytmp') + " - . "pg_total_relation_size('{$this->pdo->prefix()}tag') + " - . "pg_total_relation_size('{$this->pdo->prefix()}entrytag')"; + . "pg_total_relation_size('`{$this->pdo->prefix()}category`') + " + . "pg_total_relation_size('`{$this->pdo->prefix()}feed`') + " + . "pg_total_relation_size('`{$this->pdo->prefix()}entry`') + " + . "pg_total_relation_size('`{$this->pdo->prefix()}entrytmp`') + " + . "pg_total_relation_size('`{$this->pdo->prefix()}tag`') + " + . "pg_total_relation_size('`{$this->pdo->prefix()}entrytag`')"; $stm = $this->pdo->query($sql); } + if ($stm == false) { + return 0; + } $res = $stm->fetchAll(PDO::FETCH_COLUMN, 0); return $res[0]; } |
