quoted_printable_encode() expects parameter 1 to be string, array given
edwinricaurte opened this issue · 3 comments
After upgrade to Laravel 5.6, the system stopped working.
quoted_printable_encode() expects parameter 1 to be string, array given
/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php
public function encodeString($string, $firstLineOffset = 0, $maxLineLength = 0)
{
if ($this->charset !== 'utf-8') {
throw new RuntimeException(
sprintf('Charset "%s" not supported. NativeQpContentEncoder only supports "utf-8"', $this->charset));
}
**return $this->standardize(quoted_printable_encode($string));**
}
I have same problem on laravel 5.8 when using swiftmailer.

Content of the string when error triggered is empty array

If I transform empty array to empty string e-mail sending starts to work

Mail starts to send with correct "address", "from", "subject", but without e-mail body...
Interesting things...
Thanks! I had same problem and this fixes it.
I am using Laravel 8.1 and the error is still there, ... so I hope there is also some other solution (without overriding vendor code)

