Moved ResultSet->Close inside if, to avoid possible undefined property errors.
This commit is contained in:
parent
2c89a97894
commit
014f855c1e
@ -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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user