add missing check for non-expiring pastes, fixes #149

This commit is contained in:
El RIDO
2016-12-25 12:15:29 +01:00
parent 577031cc1f
commit f6b8ee3e20
2 changed files with 3 additions and 2 deletions

View File

@@ -417,7 +417,7 @@ class Database extends AbstractData
$pastes = array();
$rows = self::_select(
'SELECT dataid FROM ' . self::_sanitizeIdentifier('paste') .
' WHERE expiredate < ? LIMIT ?', array(time(), $batchsize)
' WHERE expiredate < ? AND expiredate != ? LIMIT ?', array(time(), 0, $batchsize)
);
if (count($rows)) {
foreach ($rows as $row) {