Topic: Compatibility fix for commit on 2020-09-28
On 28th Sep 2020, @itronics made a commit that uses a combined array addressing construct valid for PHP >= 5.4 in the file gl/includes/db/gl_db_bank_accounts.inc. In order to make it's Line 347:
$id = $row ? get_default_bank_account($row[0])['id'] : 0;
compatible with older versions of PHP like 5.3.3, etc, it should be replaced with:
$id = 0;
if ($a = get_default_bank_account($row[0])) {
$id = $a['id'];
unset ($a);
}
Such constructs when used in javascript in FA appear valid though, but it is not so for PHP < 5.4.
This is the only one instance in FA 2.4.x of it's kind hitherto.
Refer:
https://github.com/FrontAccountingERP/FA/commit/2f3375b4493c1b1e0b17c2801298275f22f8d76e#commitcomment-44633990
https://github.com/apmuthu/frontac24/commit/ccce28d5bbdf5298ff60a6ac504747fbd177faf7#commitcomment-44634360