From e7880d13d8d5546e8ff156b486efddf8b6adf95a Mon Sep 17 00:00:00 2001 From: Damien Alexandre Date: Tue, 8 Mar 2016 16:51:06 +0100 Subject: [PATCH] Handle hierarchy parent in flattening Loco resp --- src/Service/Loco.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Service/Loco.php b/src/Service/Loco.php index 4bc1e62..d96fc1b 100644 --- a/src/Service/Loco.php +++ b/src/Service/Loco.php @@ -333,7 +333,11 @@ private function flatten(array &$messages, array $subnode = null, $path = null) unset($messages[$key]); } } elseif (null !== $path) { - $messages[$path.'.'.$key] = $value; + if ($key !== 0) { + $messages[$path.'.'.$key] = $value; + } else { + $messages[$path] = $value; + } } } }