<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Compatibility fix for commit on 2020-09-28]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=9097&amp;type=atom" />
	<updated>2020-12-16T08:54:15Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=9097</id>
		<entry>
			<title type="html"><![CDATA[Re: Compatibility fix for commit on 2020-09-28]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38752#p38752" />
			<content type="html"><![CDATA[<p>Hello all,</p><p>This has been fixed, the algorithm in <strong>get_default_supplier_bank_account()</strong> is now the same as in the function <strong>get_default_customer_bank_account()</strong>.</p><p>For all of you using <strong>PHP version &lt; 5.4</strong>, you can <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/gl/includes/db/gl_db_bank_accounts.inc">download the fixed file and replace in /gl/includes/db/gl_db_bank_accounts.inc</a>.</p><p>Sorry for missing this before the 2.4.9 release.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2020-12-16T08:54:15Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38752#p38752</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Compatibility fix for commit on 2020-09-28]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38750#p38750" />
			<content type="html"><![CDATA[<p>@Joe, This is required fix for this version. So apply this changes and update to changes log as well.</p>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2020-12-16T08:38:19Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38750#p38750</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Compatibility fix for commit on 2020-09-28]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38748#p38748" />
			<content type="html"><![CDATA[<p>@joe: Fixed in <a href="https://github.com/apmuthu/frontac24/commit/ecb82218ee3d97107aeb65caeda4f5fad70d24d1">my repo</a>.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-12-15T18:38:48Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38748#p38748</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Compatibility fix for commit on 2020-09-28]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38744#p38744" />
			<content type="html"><![CDATA[<p>@joe: This should have been corrected before the FA 2.4.9 release as it will surely break any upgrade on systems with PHP &lt; v5.4.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-12-15T16:31:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38744#p38744</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Compatibility fix for commit on 2020-09-28]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=38678#p38678" />
			<content type="html"><![CDATA[<p>On 28th Sep 2020, @itronics made a <a href="https://github.com/FrontAccountingERP/FA/commit/2f3375b4493c1b1e0b17c2801298275f22f8d76e"><strong>commit</strong></a> that uses a combined array addressing construct valid for PHP &gt;= 5.4 in the file <strong>gl/includes/db/gl_db_bank_accounts.inc</strong>. In order to make it&#039;s Line 347:<br /></p><div class="codebox"><pre><code>    $id = $row ? get_default_bank_account($row[0])[&#039;id&#039;] : 0;</code></pre></div><p>compatible with older versions of PHP like 5.3.3, etc, it should be replaced with:<br /></p><div class="codebox"><pre><code>    $id = 0;
    if ($a = get_default_bank_account($row[0])) {
        $id = $a[&#039;id&#039;];
        unset ($a);
    }</code></pre></div><p>Such constructs when used in javascript in FA appear valid though, but it is not so for PHP &lt; 5.4.</p><p>This is the only one instance in FA 2.4.x of it&#039;s kind hitherto.</p><p>Refer:<br />https://github.com/FrontAccountingERP/FA/commit/2f3375b4493c1b1e0b17c2801298275f22f8d76e#commitcomment-44633990<br />https://github.com/apmuthu/frontac24/commit/ccce28d5bbdf5298ff60a6ac504747fbd177faf7#commitcomment-44634360</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2020-11-29T15:59:32Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=38678#p38678</id>
		</entry>
</feed>
