Moved ResultSet->Close inside if, to avoid possible undefined property errors.

This commit is contained in:
abacab 2008-12-30 21:40:19 -05:00
parent 2c89a97894
commit 014f855c1e

View File

@ -132,15 +132,16 @@ class currency
// Fetch all active currencies // Fetch all active currencies
$currencies = array(); $currencies = array();
$rs = $db->Execute(sqlSelect($db, "currency", "*", "status=1")); $rs = $db->Execute(sqlSelect($db, "currency", "*", "status=1"));
if ($rs && $rs->RecordCount() > 0) if ($rs)
{ {
while (!$rs->EOF) while (!$rs->EOF)
{ {
$currencies[$rs->fields['id']] = $rs->fields; $currencies[$rs->fields['id']] = $rs->fields;
$rs->MoveNext(); $rs->MoveNext();
} }
}
$rs->Close(); $rs->Close();
}
foreach ($currencies as $currFrom) foreach ($currencies as $currFrom)
{ {