Skip to content

Commit 8bb3804

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 ca03f69 + b04d62d commit 8bb3804

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Tests/Functional/app/AppKernel.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ public function __sleep(): array
8989

9090
public function __wakeup()
9191
{
92+
foreach ($this as $k => $v) {
93+
if (\is_object($v)) {
94+
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
95+
}
96+
}
97+
9298
$this->__construct($this->varDir, $this->testCase, $this->rootConfig, $this->environment, $this->debug);
9399
}
94100

0 commit comments

Comments
 (0)