File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
src/Symfony/Component/Mime Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ private function chooseEncoding(): string
218
218
public function __sleep (): array
219
219
{
220
220
// convert resources to strings for serialization
221
- if (null !== $ this ->seekable ) {
221
+ if (null !== $ this ->seekable || $ this -> body instanceof File ) {
222
222
$ this ->body = $ this ->getBody ();
223
223
$ this ->seekable = null ;
224
224
}
Original file line number Diff line number Diff line change @@ -483,6 +483,7 @@ public function testSerialize()
483
483
$ name = __DIR__ .'/Fixtures/mimetypes/test ' ;
484
484
$ file = fopen ($ name , 'r ' );
485
485
$ e ->addPart (new DataPart ($ file , 'test ' ));
486
+ $ e ->attachFromPath ($ name , 'same_test ' );
486
487
$ expected = clone $ e ;
487
488
$ n = unserialize (serialize ($ e ));
488
489
$ this ->assertEquals ($ expected ->getHeaders (), $ n ->getHeaders ());
You can’t perform that action at this time.
0 commit comments