Exporter: catch improbable error condition

This commit is contained in:
Thomas Gelf 2022-08-03 09:10:00 +02:00
parent 079e6e6514
commit 9015993b05
1 changed files with 2 additions and 0 deletions

View File

@ -203,6 +203,8 @@ class Exporter
$rows = $this->db->fetchAll($query);
} elseif ($query instanceof SimpleQuery) {
$rows = $query->fetchAll();
} else {
throw new RuntimeException('Table query needs to be either a Select or a SimpleQuery instance');
}
$services = [];
foreach ($rows as $row) {