<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — report_classes.inc - Parameter must be an array]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7448</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7448&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in report_classes.inc - Parameter must be an array.]]></description>
		<lastBuildDate>Mon, 09 Apr 2018 08:01:48 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: report_classes.inc - Parameter must be an array]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31363#p31363</link>
			<description><![CDATA[<p>Great. Thanks Joe. Glad to help.</p>]]></description>
			<author><![CDATA[null@example.com (PaulShipley)]]></author>
			<pubDate>Mon, 09 Apr 2018 08:01:48 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31363#p31363</guid>
		</item>
		<item>
			<title><![CDATA[Re: report_classes.inc - Parameter must be an array]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31361#p31361</link>
			<description><![CDATA[<p>Ah, I see. This is the only place where the variable ar_classes is declared as an array.</p><p>Your solution will fix this issue elegantly.</p><p><a href="https://github.com/FrontAccountingERP/FA/commit/aae35509fd8348f9e2c26ea923c8b2f3934dc793">Committed</a>.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 09 Apr 2018 07:20:29 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31361#p31361</guid>
		</item>
		<item>
			<title><![CDATA[Re: report_classes.inc - Parameter must be an array]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31360#p31360</link>
			<description><![CDATA[<p>Hello,</p><p>This is strange, because this is not a constructor. Will try to examine this.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Mon, 09 Apr 2018 07:14:59 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31360#p31360</guid>
		</item>
		<item>
			<title><![CDATA[report_classes.inc - Parameter must be an array]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=31359#p31359</link>
			<description><![CDATA[<p>I&#039;m getting the following message in Reports and Analysis with code version 2.4.4 (de943e150d36f815a02d4996e532a5e4e7510bc8) and PHP 7.2.3 (XAMPP 2018-03-14) with debugging on.</p><p>count(): Parameter must be an array or an object that implements Countable in file: D:\Users\shipl\htdocs\fa24\reporting\includes\reports_classes.inc at line 37<br />d:\Users\shipl\htdocs\fa24\reporting\reports_main.php:34: &nbsp; &nbsp; (BoxReports Object)-&gt;addReportClass(&#039;Customer&#039;,&#039;0&#039;)</p><p>It seems that the issue is an uncorrected old style class constructor (probably missed as it has been renamed).</p><p>I propose the following change to fix the issue.</p><p>------------------------------------------------<br /> reporting/includes/reports_classes.inc | 2 +-<br /> 1 file changed, 1 insertion(+), 1 deletion(-)</p><p>diff --git a/reporting/includes/reports_classes.inc b/reporting/includes/reports_classes.inc<br />index c872cef0..96134f95 100644<br />--- a/reporting/includes/reports_classes.inc<br />+++ b/reporting/includes/reports_classes.inc<br />@@ -26,7 +26,7 @@ class BoxReports<br /> &nbsp; &nbsp; var $ar_reports;<br /> &nbsp; &nbsp; var $ctrl_handlers = array();</p><p>-&nbsp; &nbsp; function ReportClasses()<br />+&nbsp; &nbsp; function __construct()<br /> &nbsp; &nbsp; {<br /> &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;ar_classes = array();<br /> &nbsp; &nbsp; }<br />------------------------------------------------</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (PaulShipley)]]></author>
			<pubDate>Mon, 09 Apr 2018 06:28:09 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=31359#p31359</guid>
		</item>
	</channel>
</rss>
