Skip to content

Commit f922306

Browse files
Merge branch '5.1' into 5.2
* 5.1: Dont allow unserializing classes with a destructor Dont allow unserializing classes with a destructor - 4.4 [Cache] fix possible collision when writing tmp file in filesystem adapter a colon followed by spaces exclusively separates mapping keys and values Contracts: Remove ellipsis fix handling float-like key attribute values Fix missing BCC recipients in SES bridge Dont allow unserializing classes with a destructor - 5.1
2 parents 7083f3b + 17eae63 commit f922306

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Transport/Smtp/SmtpTransport.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,16 @@ private function checkRestartThreshold(): void
340340
$this->restartCounter = 0;
341341
}
342342

343+
public function __sleep()
344+
{
345+
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
346+
}
347+
348+
public function __wakeup()
349+
{
350+
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
351+
}
352+
343353
public function __destruct()
344354
{
345355
$this->stop();

0 commit comments

Comments
 (0)