mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-05 14:33:49 +09:00
Update to laravel 7
This commit is contained in:
26
vendor/symfony/mime/RawMessage.php
vendored
26
vendor/symfony/mime/RawMessage.php
vendored
@@ -11,10 +11,10 @@
|
||||
|
||||
namespace Symfony\Component\Mime;
|
||||
|
||||
use Symfony\Component\Mime\Exception\LogicException;
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @experimental in 4.3
|
||||
*/
|
||||
class RawMessage implements \Serializable
|
||||
{
|
||||
@@ -33,8 +33,11 @@ class RawMessage implements \Serializable
|
||||
if (\is_string($this->message)) {
|
||||
return $this->message;
|
||||
}
|
||||
if ($this->message instanceof \Traversable) {
|
||||
$this->message = iterator_to_array($this->message, false);
|
||||
}
|
||||
|
||||
return $this->message = implode('', iterator_to_array($this->message, false));
|
||||
return $this->message = implode('', $this->message);
|
||||
}
|
||||
|
||||
public function toIterable(): iterable
|
||||
@@ -53,10 +56,17 @@ class RawMessage implements \Serializable
|
||||
$this->message = $message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws LogicException if the message is not valid
|
||||
*/
|
||||
public function ensureValidity()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final public function serialize()
|
||||
final public function serialize(): string
|
||||
{
|
||||
return serialize($this->__serialize());
|
||||
}
|
||||
@@ -69,17 +79,11 @@ class RawMessage implements \Serializable
|
||||
$this->__unserialize(unserialize($serialized));
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __serialize(): array
|
||||
{
|
||||
return [$this->message];
|
||||
return [$this->toString()];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function __unserialize(array $data): void
|
||||
{
|
||||
[$this->message] = $data;
|
||||
|
||||
Reference in New Issue
Block a user