From ae8ca8442e93a6e5cb3f1257df0efa3ff1602656 Mon Sep 17 00:00:00 2001 From: cweiske Date: Sun, 25 Oct 2009 15:42:09 +0000 Subject: 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 --- src/SemanticScuttle/Service/CommonDescription.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/SemanticScuttle/Service/CommonDescription.php') 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){ -- cgit v1.2.3