Skip to content

Fix destructor chain for SMTP transports#530

Draft
peterkelm wants to merge 3 commits intoShardj:masterfrom
peterkelm:master
Draft

Fix destructor chain for SMTP transports#530
peterkelm wants to merge 3 commits intoShardj:masterfrom
peterkelm:master

Conversation

@peterkelm
Copy link
Copy Markdown

Zend_Mail_Protocol_Smtp didn't have a destructor whereas its parent class Zend_Mail_Protocol_Abstract has. Yet, in PHO parent destructors have to be called explicitly.

This pull request adds a destructor to Zend_Mail_Protocol_Smtp that quits a potential open session and then calls the parent destructor.

Zend_Mail_Protocol_Smtp didn't have a destructor whereas its parent class Zend_Mail_Protocol_Abstract has. Yet, in PHO parent destructors have to be called explicitly.

This pull request adds a destructor to Zend_Mail_Protocol_Smtp that quits a potential open session and then calls the parent destructor.
@develart-projects develart-projects added the enhancement New feature or request label Mar 16, 2026
@develart-projects develart-projects added this to the 1.25.1 milestone Mar 16, 2026
@develart-projects
Copy link
Copy Markdown
Collaborator

@peterkelm seems, that tests pointing out to some problem. Could pls check it?

@develart-projects
Copy link
Copy Markdown
Collaborator

@peterkelm I meant this one, thanks

`Fatal error: Uncaught Undefined offset: 1

/home/runner/work/zf1-future/zf1-future/library/Zend/Mail/Protocol/Abstract.php:455
/home/runner/work/zf1-future/zf1-future/library/Zend/Mail/Protocol/Smtp.php:394
/home/runner/work/zf1-future/zf1-future/library/Zend/Mail/Protocol/Smtp.php:158

thrown in /home/runner/work/zf1-future/zf1-future/library/Zend/Mail/Protocol/Abstract.php on line 455
`

@develart-projects
Copy link
Copy Markdown
Collaborator

Deprecated: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/runner/work/zf1-future/zf1-future/library/Zend/Mail/Protocol/Abstract.php on line 461

Deprecated: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/runner/work/zf1-future/zf1-future/library/Zend/Mail/Protocol/Abstract.php on line 461

Deprecated: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/runner/work/zf1-future/zf1-future/library/Zend/Mail/Protocol/Abstract.php on line 461

Deprecated: preg_split(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/runner/work/zf1-future/zf1-future/library/Zend/Mail/Protocol/Abstract.php on line 461
PHPUnit 9.6.34 by Sebastian Bergmann and contributors.

Undefined array key 1
Error: Process completed with exit code 2.

@develart-projects develart-projects marked this pull request as draft March 25, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants