소스 검색

[HttpFoundation] changed \LogicException to \InvalidArgumentException

Fabien Potencier 13 년 전
부모
커밋
8f50592f31
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/HttpFoundation/FileBag.php
  2. 1 1
      tests/Symfony/Tests/Component/HttpFoundation/FileBagTest.php

+ 1 - 1
src/Symfony/Component/HttpFoundation/FileBag.php

@@ -60,7 +60,7 @@ class FileBag extends ParameterBag
         if (is_array($value) || $value instanceof UploadedFile) {
             parent::set($key, $this->convertFileInformation($value));
         } else {
-            throw new \LogicException('An uploaded file must be an array or an instance of UploadedFile.');
+            throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.');
         }
     }
 

+ 1 - 1
tests/Symfony/Tests/Component/HttpFoundation/FileBagTest.php

@@ -23,7 +23,7 @@ use Symfony\Component\HttpFoundation\FileBag;
 class FileBagTest extends \PHPUnit_Framework_TestCase
 {
     /**
-     * @expectedException \LogicException
+     * @expectedException \InvalidArgumentException
      */
     public function testFileMustBeAnArrayOrUploadedFile()
     {