Browse Source

accept also empty arrays to reset the exclusionStrategy

Christian Stocker 13 năm trước cách đây
mục cha
commit
37ec1ad942
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      Serializer/Serializer.php

+ 1 - 1
Serializer/Serializer.php

@@ -57,7 +57,7 @@ class Serializer implements SerializerInterface
     
     
     public function setGroups($groups)
     public function setGroups($groups)
     {
     {
-        if (null === $groups) {
+        if (!$groups) {
             $this->exclusionStrategy = null;
             $this->exclusionStrategy = null;
 
 
             return;
             return;