summaryrefslogtreecommitdiff
path: root/src/SemanticScuttle/Service/CommonDescription.php
diff options
context:
space:
mode:
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-25 15:42:09 +0000
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>2009-10-25 15:42:09 +0000
commitae8ca8442e93a6e5cb3f1257df0efa3ff1602656 (patch)
tree6c4f5fc9b332975c96ff5621ce3c1a56911ecc4a /src/SemanticScuttle/Service/CommonDescription.php
parent21db3ef6daeaa4d0da05a7e89c30244e9caff0fd (diff)
downloadsemanticscuttle-ae8ca8442e93a6e5cb3f1257df0efa3ff1602656.tar.gz
semanticscuttle-ae8ca8442e93a6e5cb3f1257df0efa3ff1602656.tar.bz2
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/CommonDescription.php')
-rw-r--r--src/SemanticScuttle/Service/CommonDescription.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/SemanticScuttle/Service/CommonDescription.php b/src/SemanticScuttle/Service/CommonDescription.php
index 75a67c0..c17e7e4 100644
--- a/src/SemanticScuttle/Service/CommonDescription.php
+++ b/src/SemanticScuttle/Service/CommonDescription.php
@@ -55,8 +55,9 @@ class SemanticScuttle_Service_CommonDescription extends SemanticScuttle_DbServic
return false;
}
- if ($row =& $this->db->sql_fetchrow($dbresult)) {
- $this->db->sql_freeresult($dbresult);
+ $row = $this->db->sql_fetchrow($dbresult);
+ $this->db->sql_freeresult($dbresult);
+ if ($row) {
return $row;
} else {
return false;
@@ -129,8 +130,9 @@ class SemanticScuttle_Service_CommonDescription extends SemanticScuttle_DbServic
return false;
}
- if ($row =& $this->db->sql_fetchrow($dbresult)) {
- $this->db->sql_freeresult($dbresult);
+ $row = $this->db->sql_fetchrow($dbresult);
+ $this->db->sql_freeresult($dbresult);
+ if ($row) {
return $row;
} else {
return false;
@@ -148,8 +150,9 @@ class SemanticScuttle_Service_CommonDescription extends SemanticScuttle_DbServic
return false;
}
- return $this->db->sql_fetchrowset($dbresult);
-
+ $rowset = $this->db->sql_fetchrowset($dbresult);
+ $this->db->sql_freeresult($dbresult);
+ return $rowset;
}
function deleteDescriptionsForUser($uId){