Fix PHP notice when using indexes without defined types

This commit is contained in:
Michaël Perrin 2014-12-17 12:44:57 +01:00 committed by Tim Nagel
parent c4a2858265
commit 64fa26e3d9

View file

@ -41,6 +41,8 @@ class ContainerSource implements SourceInterface
$indexes = array();
foreach ($this->configArray as $config) {
$types = array();
if (isset($config['types'])) {
foreach ($config['types'] as $typeConfig) {
$types[$typeConfig['name']] = new TypeConfig(
$typeConfig['name'],
@ -49,6 +51,7 @@ class ContainerSource implements SourceInterface
);
// TODO: handle prototypes..
}
}
$index = new IndexConfig($config['name'], $types, array(
'elasticSearchName' => $config['elasticsearch_name'],