From c55d4152314795f4affe75e11f387fcbda635a35 Mon Sep 17 00:00:00 2001 From: Valentas Date: Mon, 18 Jul 2016 23:28:28 +0300 Subject: [PATCH] fix for #1634 Do not typehint `array`, but check internally. Fixes https://github.com/Atlantic18/DoctrineExtensions/issues/1634 --- lib/Gedmo/Translatable/Mapping/Driver/Yaml.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;