Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13189146
D19464.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D19464.diff
View Options
diff --git a/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php b/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php
--- a/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php
+++ b/src/aphront/storage/connection/mysql/AphrontMySQLiDatabaseConnection.php
@@ -6,6 +6,8 @@
final class AphrontMySQLiDatabaseConnection
extends AphrontBaseMySQLDatabaseConnection {
+ private $connectionOpen = false;
+
public function escapeUTF8String($string) {
$this->validateUTF8String($string);
return $this->escapeBinaryString($string);
@@ -24,7 +26,10 @@
}
protected function closeConnection() {
- $this->requireConnection()->close();
+ if ($this->connectionOpen) {
+ $this->requireConnection()->close();
+ $this->connectionOpen = false;
+ }
}
protected function connect() {
@@ -76,6 +81,8 @@
$this->throwConnectionException($errno, $error, $user, $host);
}
+ $this->connectionOpen = true;
+
$ok = @$conn->set_charset('utf8mb4');
if (!$ok) {
$ok = $conn->set_charset('binary');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
May 12 2024, 5:45 AM (5 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6290213
Default Alt Text
D19464.diff (1 KB)
Attached To
Mode
D19464: Prevent double mysqli close() after query timeout
Attached
Detach File
Event Timeline
Log In to Comment