mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-03 13:40:00 +09:00
Update to laravel 7
This commit is contained in:
@@ -15,8 +15,6 @@ use Symfony\Component\Mime\Header\Headers;
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* @experimental in 4.3
|
||||
*/
|
||||
abstract class AbstractMultipartPart extends AbstractPart
|
||||
{
|
||||
@@ -76,10 +74,24 @@ abstract class AbstractMultipartPart extends AbstractPart
|
||||
yield '--'.$this->getBoundary()."--\r\n";
|
||||
}
|
||||
|
||||
public function asDebugString(): string
|
||||
{
|
||||
$str = parent::asDebugString();
|
||||
foreach ($this->getParts() as $part) {
|
||||
$lines = explode("\n", $part->asDebugString());
|
||||
$str .= "\n └ ".array_shift($lines);
|
||||
foreach ($lines as $line) {
|
||||
$str .= "\n |".$line;
|
||||
}
|
||||
}
|
||||
|
||||
return $str;
|
||||
}
|
||||
|
||||
private function getBoundary(): string
|
||||
{
|
||||
if (null === $this->boundary) {
|
||||
$this->boundary = '_=_symfony_'.time().'_'.bin2hex(random_bytes(16)).'_=_';
|
||||
$this->boundary = strtr(base64_encode(random_bytes(6)), '+/', '-_');
|
||||
}
|
||||
|
||||
return $this->boundary;
|
||||
|
||||
Reference in New Issue
Block a user