From 014f855c1e6385fda3b467a5fb506ac48bf0df4a Mon Sep 17 00:00:00 2001 From: abacab Date: Tue, 30 Dec 2008 21:40:19 -0500 Subject: [PATCH] Moved ResultSet->Close inside if, to avoid possible undefined property errors. --- modules/currency/currency.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/currency/currency.inc.php b/modules/currency/currency.inc.php index 6e99bff7..099c68be 100644 --- a/modules/currency/currency.inc.php +++ b/modules/currency/currency.inc.php @@ -132,15 +132,16 @@ class currency // Fetch all active currencies $currencies = array(); $rs = $db->Execute(sqlSelect($db, "currency", "*", "status=1")); - if ($rs && $rs->RecordCount() > 0) + if ($rs) { while (!$rs->EOF) { $currencies[$rs->fields['id']] = $rs->fields; $rs->MoveNext(); } + + $rs->Close(); } - $rs->Close(); foreach ($currencies as $currFrom) {