We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61b241d commit bcb14d4Copy full SHA for bcb14d4
lib/Drupal/Core/Database/Transaction.php
@@ -38,6 +38,13 @@ public function __destruct() {
38
$this->connection->transactionManager()->unpile($this->name, $this->id);
39
}
40
41
+ /**
42
+ * Prevent transactions from being unserialized.
43
+ */
44
+ public function __wakeup(): void {
45
+ throw new \BadMethodCallException('Cannot unserialize ' . get_class($this));
46
+ }
47
+
48
/**
49
* Retrieves the name of the transaction or savepoint.
50
*/
0 commit comments