mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
IniRepository: Make key column validation in the constructor more readable
refs #13034
This commit is contained in:
parent
ca689bc944
commit
ac3e182f0d
@ -67,7 +67,7 @@ abstract class IniRepository extends Repository implements Extensible, Updatable
|
||||
{
|
||||
parent::__construct($ds); // First! Due to init().
|
||||
|
||||
if (! ($ds === null || $ds->getConfigObject()->getKeyColumn())) {
|
||||
if ($ds !== null && !$ds->getConfigObject()->getKeyColumn()) {
|
||||
throw new ProgrammingError('INI repositories require their data source to provide a valid key column');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user