diff --git a/FA24Mods/CHANGELOG_FA24Mods.txt b/FA24Mods/CHANGELOG_FA24Mods.txt index 17417640..969c1319 100644 --- a/FA24Mods/CHANGELOG_FA24Mods.txt +++ b/FA24Mods/CHANGELOG_FA24Mods.txt @@ -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 diff --git a/FA24Mods/gl/includes/db/gl_db_bank_accounts.inc b/FA24Mods/gl/includes/db/gl_db_bank_accounts.inc index ee535be7..67568951 100644 --- a/FA24Mods/gl/includes/db/gl_db_bank_accounts.inc +++ b/FA24Mods/gl/includes/db/gl_db_bank_accounts.inc @@ -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; } //---------------------------------------------------------------------------------------------