Skip to content

Commit 2f833cf

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 7a62495 + 0b171a3 commit 2f833cf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

UnicodeString.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,10 @@ public function startsWith($prefix): bool
359359

360360
public function __wakeup()
361361
{
362+
if (!\is_string($this->string)) {
363+
throw new \BadMethodCallException('Cannot unserialize '.__CLASS__);
364+
}
365+
362366
normalizer_is_normalized($this->string) ?: $this->string = normalizer_normalize($this->string);
363367
}
364368

0 commit comments

Comments
 (0)