diff options
author | 2009-10-25 15:42:09 +0000 | |
---|---|---|
committer | 2009-10-25 15:42:09 +0000 | |
commit | ae8ca8442e93a6e5cb3f1257df0efa3ff1602656 (patch) | |
tree | 6c4f5fc9b332975c96ff5621ce3c1a56911ecc4a /src/SemanticScuttle/Service/Tag.php | |
parent | 21db3ef6daeaa4d0da05a7e89c30244e9caff0fd (diff) | |
download | scuttle-ae8ca8442e93a6e5cb3f1257df0efa3ff1602656.tar.gz scuttle-ae8ca8442e93a6e5cb3f1257df0efa3ff1602656.zip |
Fix *all* unfreed results in unit tests - this was a hard task, but worth it
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@414 b3834d28-1941-0410-a4f8-b48e95affb8f
Diffstat (limited to 'src/SemanticScuttle/Service/Tag.php')
-rw-r--r-- | src/SemanticScuttle/Service/Tag.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/SemanticScuttle/Service/Tag.php b/src/SemanticScuttle/Service/Tag.php index 93cfd45..e5393a1 100644 --- a/src/SemanticScuttle/Service/Tag.php +++ b/src/SemanticScuttle/Service/Tag.php @@ -34,7 +34,9 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService return false; } - if ($row =& $this->db->sql_fetchrow($dbresult)) { + $row = $this->db->sql_fetchrow($dbresult); + $this->db->sql_freeresult($dbresult); + if ($row) { return $row; } else { return array('tDescription'=>''); @@ -52,7 +54,9 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService return false; } - if ($row =& $this->db->sql_fetchrow($dbresult)) { + $row = $this->db->sql_fetchrow($dbresult); + $this->db->sql_freeresult($dbresult); + if ($row) { return true; } else { return false; @@ -69,7 +73,9 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService return false; } - return $this->db->sql_fetchrowset($dbresult); + $rowset = $this->db->sql_fetchrowset($dbresult); + $this->db->sql_freeresult($dbresult); + return $rowset; } function updateDescription($tag, $uId, $desc) { |