Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13971877
D12841.id30885.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
969 B
Referenced Files
None
Subscribers
None
D12841.id30885.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D12841: Make AphrontWriteGuard disposal more durable
Attached
Detach File
Event Timeline
Log In to Comment