From ce91872b228fd3b6c1ff862dac619dfcc7bef822 Mon Sep 17 00:00:00 2001 From: Burkhard Reffeling Date: Fri, 7 Nov 2014 00:17:21 +0000 Subject: [PATCH] ignores falsey values other than null when removing keys from PATCH request data --- Form/EventListener/BindRequestListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Form/EventListener/BindRequestListener.php b/Form/EventListener/BindRequestListener.php index e0951f0..24e3cf6 100644 --- a/Form/EventListener/BindRequestListener.php +++ b/Form/EventListener/BindRequestListener.php @@ -113,7 +113,7 @@ private function unserializeForm($data, $form, $isXml, $isPatch) // If we are PATCHing then don't fill in missing attributes with null $childValue = $this->unserializeForm($value, $child, $isXml, $isPatch); - if (!($isPatch && !$childValue)) $result[$child->getName()] = $childValue; + if (!($isPatch && is_null($childValue))) $result[$child->getName()] = $childValue; } return $result;