IniRepository: Make key column validation in the constructor more readable

refs #13034
This commit is contained in:
Johannes Meyer 2016-11-04 09:59:37 +01:00
parent ca689bc944
commit ac3e182f0d
1 changed files with 1 additions and 1 deletions

View File

@ -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');
}
}