QueryBasedTable: do not fail without paginator

This commit is contained in:
Thomas Gelf 2017-08-21 08:08:18 +02:00
parent 058bcb083d
commit 466a229041

View File

@ -126,7 +126,8 @@ abstract class QueryBasedTable extends Table implements Countable
public function isOnFirstPage()
{
if ($this->paginator === null) {
throw new ProgrammingError('Unable to access my paginator');
// No paginator? Then there should be only a single page
return true;
}
return $this->paginator->getCurrentPage() === 1;