소스 검색

Exception message on boolean type

Asmir Mustafic 11 년 전
부모
커밋
24f46019f5
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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) {