FrontAccountingERP / FA

Official FrontAccounting mirror repository
91 stars 95 forks source link

PHP version backwards compatibility issue #42

Open apmuthu opened 3 years ago

apmuthu commented 3 years ago

https://github.com/FrontAccountingERP/FA/commit/2f3375b4493c1b1e0b17c2801298275f22f8d76e#commitcomment-44633990

Line 347 in gl/includes/db/gl_db_bank_accounts.inc:

    $id = $row ? get_default_bank_account($row[0])['id'] : 0;

is valid for PHP >= 5.4. For older versions of PHP like 5.3.3, etc, replace the said line with:

    $id = 0;
    if ($a = get_default_bank_account($row[0])) {
        $id = $a['id'];
        unset ($a);
    }
apmuthu commented 3 years ago

https://frontaccounting.com/punbb/viewtopic.php?id=9097