Skip to content

Commit

Permalink
PHP < 5.4 compatibility fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
apmuthu committed Dec 15, 2020
1 parent d379378 commit ecb8221
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions FA24Mods/CHANGELOG_FA24Mods.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Files in this folder overwrite their counterparts in the core to effect the mods by Ap.Muthu.

2020-12-15 PHP < 5.4 compatibility fixed
2020-12-15 Cloned gl_db_bank_accounts.inc for PHP < 5.4 compatibility fix
2020-09-30 Upstream installer cleanup
2020-09-28 Upstream cleanup
Expand Down
6 changes: 5 additions & 1 deletion FA24Mods/gl/includes/db/gl_db_bank_accounts.inc
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,11 @@ function get_default_supplier_bank_account($supplier_id)
$sql = "SELECT curr_code FROM ".TB_PREF."suppliers WHERE supplier_id=".db_escape($supplier_id);
$result = db_query($sql, "could not retreive default supplier currency code");
$row = db_fetch_row($result);
$id = $row ? get_default_bank_account($row[0])['id'] : 0;
$id = 0;
if ($a = get_default_bank_account($row[0])) {
$id = $a['id'];
unset ($a);
}
return $id;
}
//---------------------------------------------------------------------------------------------
Expand Down

0 comments on commit ecb8221

Please sign in to comment.