<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — reports_classes.inc:40: count()]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7782</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7782&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in reports_classes.inc:40: count().]]></description>
		<lastBuildDate>Sun, 06 Oct 2019 10:01:04 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36200#p36200</link>
			<description><![CDATA[<p>All <strong>reporting/repXXX.php</strong> files call the <strong>reporting/includes/pdf_reports.inc</strong> based on destination chosen in the report request form.</p><p>All <strong>reporting/repXXX.php</strong> files are called only from <strong>reporting/reports_main.php</strong> which in turn &quot;includes&quot; the <strong>includes/ui.inc</strong> and that in turn &quot;includes&quot; the <strong>includes/ui/ui_globals.inc</strong> file (among others) that defines the <strong>function count_array()</strong>.</p><p>Hence no need for separate inclusion of <strong>includes/ui/ui_globals.inc</strong> except when the reports are used <span class="bbu">independent of the above file</span>.</p><p>Wonder why Line 374 was left out from such a change in <strong>reporting/includes/pdf_report.inc</strong>.<br /></p><div class="codebox"><pre><code>        $count = count($this-&gt;headers2);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sun, 06 Oct 2019 10:01:04 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36200#p36200</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36199#p36199</link>
			<description><![CDATA[<p>We only need to include the 2 changes made by @notrinos.<br />The inclusion of the ui_globals.inc has already been done in other places.</p><p><a href="https://github.com/FrontAccountingERP/FA/commit/44a7cb94d5002065a18471e4b6f0f8a882d7cd0e">Committed</a> to repo 2.4.7 stable.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Sun, 06 Oct 2019 08:06:30 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36199#p36199</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36193#p36193</link>
			<description><![CDATA[<p>Search for &quot;count(&quot; in the <strong>reporting/includes/pdf_report.inc</strong> and we find 15 occurrences that need to be replaced with &quot;count_array(&quot;</p><p>@joe: can commit this along with the inclusion of <strong>includes/ui/ui_globals.inc</strong> in it.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Sat, 05 Oct 2019 18:15:02 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36193#p36193</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=36191#p36191</link>
			<description><![CDATA[<p><strong>pdf_report.inc</strong> lines 344 and 379 may need <em>count_array()</em> also.<br />And <strong>includes/ui/ui_globals.inc</strong> has to be included here since <strong>function count_array()</strong> is defined there.</p>]]></description>
			<author><![CDATA[null@example.com (notrinos)]]></author>
			<pubDate>Sat, 05 Oct 2019 13:10:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=36191#p36191</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33447#p33447</link>
			<description><![CDATA[<p>These files have been committed to stable repo. Just replace the count() with count_array() in both places.</p><p>Thanks @notrinos for finding these.</p><p>Please continue testing. Thanks in advance.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Thu, 29 Nov 2018 13:20:24 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33447#p33447</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33443#p33443</link>
			<description><![CDATA[<p>There are still some where<br /></p><ol class="decimal"><li><p><strong>/includes/ui/items_cart.inc line 312</strong>. Error firing on Modifying Journal Transaction</p></li><li><p><strong>/includes/ui/contacts_view.inc line 137</strong>. Error firing on Add Customer Contact without selecting Contact Category </p></li></ol>]]></description>
			<author><![CDATA[null@example.com (notrinos)]]></author>
			<pubDate>Thu, 29 Nov 2018 09:43:10 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33443#p33443</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33442#p33442</link>
			<description><![CDATA[<p>I have now committed a fix, where the count() was replaced with count_array(). It was only needed in 3 files and the count_array() was added at the end in the file /includes/ui/ui_globals.inc.</p><p>The files are:<br />/admin/db/maintenance_db.inc(186): $cnt = max(1, count_array($db_connections));<br />/reporting/includes/reports_classes.inc(37): $class_id = count_array($this-&gt;ar_classes);<br />/sales/includes/sales_db.inc(371): if (!count_array($trans_no))</p><p>and the count_array definition:<br />/includes/ui/ui_globals.inc(65): function count_array($array)</p><p>I have been testing FA all over, but I will ask you who has the PHP 7.2.X installed to download a snapshot of 2.4.4 from the repo <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/">here</a>.</p><p>There was also a problem with the 2.nd parameter in number_format2 in the file /includes/current_user.inc. We used a float value as an integer parameter. Fixed with intval().</p><p>Please help me test this snapshot so we can find more odd count() and other problems.</p><p>Thank you in advance.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Thu, 29 Nov 2018 08:37:50 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33442#p33442</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33439#p33439</link>
			<description><![CDATA[<p>Yes, they are part of the Advanced PHP debugger.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Thu, 29 Nov 2018 03:58:30 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33439#p33439</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33433#p33433</link>
			<description><![CDATA[<p>I see that the functions rename_function and override_function are not part of the standard PHP and therefore can not be used.</p><p>I will follow @cleal example and review all the count() calls. Where the check is needed I will use the count_array() instead of&nbsp; count().</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 28 Nov 2018 22:26:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33433#p33433</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33430#p33430</link>
			<description><![CDATA[<p>@joe: Line 186 in <strong>admin/db/maintenance_db.inc</strong> can be preceded with:<br /></p><div class="codebox"><pre><code>if (!(is_array($db_connections)) $db_connections = array($db_connections);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 28 Nov 2018 16:26:00 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33430#p33430</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33429#p33429</link>
			<description><![CDATA[<p>I will test a solution with rename_function and override_function.<br />We will include a new file with specific functions with new behaviors if<br />&nbsp; version_compare &gt;= 7.2.0</p><p>Then we do not need to change anything in the code.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 28 Nov 2018 16:20:22 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33429#p33429</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33427#p33427</link>
			<description><![CDATA[<p>Line 186 file maintenance_db.inc also needs array check function.<br />Error raising on Installation Wizard step 5.</p>]]></description>
			<author><![CDATA[null@example.com (notrinos)]]></author>
			<pubDate>Wed, 28 Nov 2018 14:55:20 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33427#p33427</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33089#p33089</link>
			<description><![CDATA[<p>I think, into /includes/ui/ one file named like that.&nbsp; In this add all functions to fix issues of deprecated functions or fix others.</p><p>And then, add include into /includes/ui.inc</p>]]></description>
			<author><![CDATA[null@example.com (cleal)]]></author>
			<pubDate>Wed, 31 Oct 2018 20:27:43 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33089#p33089</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33087#p33087</link>
			<description><![CDATA[<p>All such PHP 7.x gotchas can be made into a separate <strong>php7.php</strong> file to be <strong>include</strong>d if a PHP7.x version is in use.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Wed, 31 Oct 2018 18:47:38 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33087#p33087</guid>
		</item>
		<item>
			<title><![CDATA[Re: reports_classes.inc:40: count()]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=33082#p33082</link>
			<description><![CDATA[<p>Yes maybe a good idea.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Wed, 31 Oct 2018 06:12:21 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=33082#p33082</guid>
		</item>
	</channel>
</rss>
