Page MenuHomePhabricator

D12841.id30885.diff
No OneTemporary

D12841.id30885.diff

diff --git a/src/aphront/writeguard/AphrontWriteGuard.php b/src/aphront/writeguard/AphrontWriteGuard.php
--- a/src/aphront/writeguard/AphrontWriteGuard.php
+++ b/src/aphront/writeguard/AphrontWriteGuard.php
@@ -36,6 +36,7 @@
private $callback;
private $allowDepth = 0;
+ private $disposed;
/* -( Managing Write Guards )---------------------------------------------- */
@@ -109,6 +110,7 @@
'beginUnguardedWrites()',
'endUnguardedWrites()'));
}
+ $this->disposed = true;
self::$instance = null;
}
@@ -119,6 +121,7 @@
* @return void
*/
public function disposeAbruptly() {
+ $this->disposed = true;
self::$instance = null;
}
@@ -290,7 +293,7 @@
* @task internal
*/
public function __destruct() {
- if (isset(self::$instance)) {
+ if (!$this->disposed) {
throw new Exception(
pht(
'%s was not properly disposed of! Call %s on every %s object you '.

File Metadata

Mime Type
text/plain
Expires
Oct 18 2024, 3:49 PM (4 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6727642
Default Alt Text
D12841.id30885.diff (969 B)

Event Timeline