diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2009-12-11 05:59:45 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2009-12-11 05:59:45 +0100 |
commit | 76b65f0ce176e0162bc7eedef951d37e96179ee2 (patch) | |
tree | 7bc03aede6090b479c639a5817ffa32e8224feef | |
parent | 078816f030c368267d6636a604a86dedac78e309 (diff) | |
download | rafb-nopaste-76b65f0ce176e0162bc7eedef951d37e96179ee2.tar.gz rafb-nopaste-76b65f0ce176e0162bc7eedef951d37e96179ee2.tar.xz rafb-nopaste-76b65f0ce176e0162bc7eedef951d37e96179ee2.zip |
tried to close the db connection clean
-rw-r--r-- | paste/include/storage/MysqlStorage.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/paste/include/storage/MysqlStorage.php b/paste/include/storage/MysqlStorage.php index 4c713bc..bae4855 100644 --- a/paste/include/storage/MysqlStorage.php +++ b/paste/include/storage/MysqlStorage.php @@ -71,8 +71,11 @@ INDEX (nick) function __destruct() { - if (is_instance_of($this->mysql, 'mysqli')) - $this->mysql->close(); + if (is_null($this->mysql)) + return; + + $this->mysql->close(); + $this->mysql = null; } public function setContent($content, $language, $nick, $description) @@ -119,9 +122,9 @@ INDEX (nick) die('No such paste'); } - echo PastifyText($content, $lang, $description); - $shmt->close(); + + echo PastifyText($content, $lang, $description); } } } |