Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SwiftMailer error Undefined property: Swift_Transport_StreamBuffer::$_sequence

I'm using SwiftMailer to send email by SMTP. The library is working fine when running in the server with PHP version 5.4. However, after upgrading the server to PHP version 5.5, email was not sent and the server threw the following error:

Undefined property: Swift_Transport_StreamBuffer::$_sequence

How can I resolve this issue? Thanks.

like image 672
Osh Mansor Avatar asked Sep 24 '14 15:09

Osh Mansor


1 Answers

In swift-mailer/classes/Swift/ByteStream/AbstractFilterableInputStream.php change

 private $_sequence = 0;

to

 protected $_sequence = 0;

Then the message goes away.

I must use a different version of Swiftmailer than you in the legacy project I got the exact same error notice. My Swift::VERSION is 4.1.1.

like image 199
hakre Avatar answered Sep 29 '22 04:09

hakre