<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — db_pager.inc - count(): Parameter must be an array]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7475&amp;type=atom" />
	<updated>2018-04-18T09:25:21Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7475</id>
		<entry>
			<title type="html"><![CDATA[Re: db_pager.inc - count(): Parameter must be an array]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31451#p31451" />
			<content type="html"><![CDATA[<p>Thanks. Fixed and <a href="https://github.com/FrontAccountingERP/FA/commit/7b76d3bbbde9f30a1659a995d542b7c5a91f9fbf">committed</a> to Repo.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2018-04-18T09:25:21Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31451#p31451</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[db_pager.inc - count(): Parameter must be an array]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=31448#p31448" />
			<content type="html"><![CDATA[<p>Hi,</p><p>Using FA 2.4.4 and PHP 7.2.3 (XAMPP 2018-03-14) with debugging on, I am getting the following error message when loading Customer Allocations:</p><p>count(): Parameter must be an array or an object that implements Countable in file: D:\Users\shipl\htdocs\fa24\includes\db_pager.inc at line 293<br />D:\Users\shipl\htdocs\fa24\includes\db_pager.inc:347: &nbsp; &nbsp; (db_pager Object)-&gt;_sql_gen(&#039;1&#039;)<br />D:\Users\shipl\htdocs\fa24\includes\db_pager.inc:180: &nbsp; &nbsp; (db_pager Object)-&gt;_init()<br />D:\Users\shipl\htdocs\fa24\includes\db_pager.inc:392: &nbsp; &nbsp; (db_pager Object)-&gt;query()<br />D:\Users\shipl\htdocs\fa24\includes\ui\db_pager_view.inc:45: &nbsp; &nbsp; (db_pager Object)-&gt;select_records()<br />d:\Users\shipl\htdocs\fa24\sales\allocations\customer_allocation_main.php:113: &nbsp; &nbsp; display_db_pager((db_pager Object))</p><p>Checking the code for db_pager.inc, while $extra_where is defined on line 52, there are several ways it can be used without being initialized. </p><p>I propose changing line 52 from</p><p>&nbsp; &nbsp; var&nbsp; &nbsp; $extra_where;</p><p>to </p><p>&nbsp; &nbsp; var&nbsp; &nbsp; $extra_where = array();</p><p>Hope this helps.</p><p>Thanks.</p>]]></content>
			<author>
				<name><![CDATA[PaulShipley]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20029</uri>
			</author>
			<updated>2018-04-18T01:53:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=31448#p31448</id>
		</entry>
</feed>
