summaryrefslogtreecommitdiffstats
path: root/paste
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2009-12-11 05:59:45 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2009-12-11 05:59:45 +0100
commit76b65f0ce176e0162bc7eedef951d37e96179ee2 (patch)
tree7bc03aede6090b479c639a5817ffa32e8224feef /paste
parent078816f030c368267d6636a604a86dedac78e309 (diff)
downloadrafb-nopaste-76b65f0ce176e0162bc7eedef951d37e96179ee2.tar.gz
rafb-nopaste-76b65f0ce176e0162bc7eedef951d37e96179ee2.tar.xz
rafb-nopaste-76b65f0ce176e0162bc7eedef951d37e96179ee2.zip
tried to close the db connection clean
Diffstat (limited to 'paste')
-rw-r--r--paste/include/storage/MysqlStorage.php11
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);
}
}
}