diff --git a/lib/Gedmo/Translatable/Mapping/Driver/Yaml.php b/lib/Gedmo/Translatable/Mapping/Driver/Yaml.php index e1fd3fe0d4..4ee454edc3 100644 --- a/lib/Gedmo/Translatable/Mapping/Driver/Yaml.php +++ b/lib/Gedmo/Translatable/Mapping/Driver/Yaml.php @@ -73,9 +73,9 @@ protected function _loadMappingFile($file) return \Symfony\Component\Yaml\Yaml::parse(file_get_contents($file)); } - private function buildFieldConfiguration($field, array $fieldMapping, array &$config) + private function buildFieldConfiguration($field, $fieldMapping, array &$config) { - if (isset($fieldMapping['gedmo'])) { + if (is_array($fieldMapping) && isset($fieldMapping['gedmo'])) { if (in_array('translatable', $fieldMapping['gedmo']) || isset($fieldMapping['gedmo']['translatable'])) { // fields cannot be overrided and throws mapping exception $config['fields'][] = $field;