From 904a664dfeb7cfe29cf7ad14abccbe90a8ae8ad3 Mon Sep 17 00:00:00 2001 From: skuro Date: Fri, 8 Mar 2013 22:08:40 +0100 Subject: [PATCH] Allow processing of null mappings in configuration --- DependencyInjection/Configuration.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 783285f..e91d3d5 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -369,9 +369,14 @@ class Configuration * @param array $mappings The mappings for the current type * @return array The nested mappings defined for this type */ - protected function getNestingsForType($mappings) + protected function getNestingsForType(array $mappings = null) { + if ($mappings === null) { + return array(); + } + $nestings = array(); + foreach ($mappings as $field) { if (isset($field['fields'])) { $this->addPropertyNesting($field, $nestings, 'fields');