composer update
This commit is contained in:
6
vendor/symfony/mime/Part/DataPart.php
vendored
6
vendor/symfony/mime/Part/DataPart.php
vendored
@@ -35,7 +35,7 @@ class DataPart extends TextPart
|
||||
if (null === $contentType) {
|
||||
$contentType = 'application/octet-stream';
|
||||
}
|
||||
list($this->mediaType, $subtype) = explode('/', $contentType);
|
||||
[$this->mediaType, $subtype] = explode('/', $contentType);
|
||||
|
||||
parent::__construct($body, null, $subtype, $encoding);
|
||||
|
||||
@@ -56,6 +56,10 @@ class DataPart extends TextPart
|
||||
$contentType = self::$mimeTypes->getMimeTypes($ext)[0] ?? 'application/octet-stream';
|
||||
}
|
||||
|
||||
if (false === is_readable($path)) {
|
||||
throw new InvalidArgumentException(sprintf('Path "%s" is not readable.', $path));
|
||||
}
|
||||
|
||||
if (false === $handle = @fopen($path, 'r', false)) {
|
||||
throw new InvalidArgumentException(sprintf('Unable to open path "%s".', $path));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user