🔧
This commit is contained in:
4
vendor/symfony/mime/Part/DataPart.php
vendored
4
vendor/symfony/mime/Part/DataPart.php
vendored
@@ -29,7 +29,7 @@ class DataPart extends TextPart
|
||||
/**
|
||||
* @param resource|string|File $body Use a File instance to defer loading the file until rendering
|
||||
*/
|
||||
public function __construct($body, string $filename = null, string $contentType = null, string $encoding = null)
|
||||
public function __construct($body, ?string $filename = null, ?string $contentType = null, ?string $encoding = null)
|
||||
{
|
||||
if ($body instanceof File && !$filename) {
|
||||
$filename = $body->getFilename();
|
||||
@@ -47,7 +47,7 @@ class DataPart extends TextPart
|
||||
$this->setDisposition('attachment');
|
||||
}
|
||||
|
||||
public static function fromPath(string $path, string $name = null, string $contentType = null): self
|
||||
public static function fromPath(string $path, ?string $name = null, ?string $contentType = null): self
|
||||
{
|
||||
return new self(new File($path), $name, $contentType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user