Skip to content

Commit b6b2a04

Browse files
Merge branch '4.4' into 5.1
* 4.4: 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
2 parents 6ebc692 + bd6af72 commit b6b2a04

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Lock.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,16 @@ public function __construct(Key $key, PersistingStoreInterface $store, float $tt
5050
$this->logger = new NullLogger();
5151
}
5252

53+
public function __sleep()
54+
{
55+
throw new \BadMethodCallException('Cannot serialize '.__CLASS__);
56+
}
57+
58+
public function __wakeup()
59+
{
60+
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
61+
}
62+
5363
/**
5464
* Automatically releases the underlying lock when the object is destructed.
5565
*/

0 commit comments

Comments
 (0)