Pārlūkot izejas kodu

Exception message on boolean type

Asmir Mustafic 11 gadi atpakaļ
vecāks
revīzija
24f46019f5
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      src/JMS/Serializer/XmlDeserializationVisitor.php

+ 1 - 1
src/JMS/Serializer/XmlDeserializationVisitor.php

@@ -109,7 +109,7 @@ class XmlDeserializationVisitor extends AbstractVisitor
         } elseif ('false' === $data || '0' === $data) {
             $data = false;
         } else {
-            throw new RuntimeException(sprintf('Could not convert data to boolean. Expected "true", or "false", but got %s.', json_encode($data)));
+            throw new RuntimeException(sprintf('Could not convert data to boolean. Expected "true", "false", "1" or "0", but got %s.', json_encode($data)));
         }
 
         if (null === $this->result) {