<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[FrontAccounting forum — Bug in includes\ui\ui_input.inc]]></title>
		<link>https://frontaccounting.com/punbb/viewtopic.php?id=7021</link>
		<atom:link href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7021&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Bug in includes\ui\ui_input.inc.]]></description>
		<lastBuildDate>Thu, 12 Oct 2017 15:09:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=29004#p29004</link>
			<description><![CDATA[<p>This change has been <a href="https://github.com/FrontAccountingERP/FA/commit/9549235b87720c573a2f1e2144d5a1bb55e6e8fc">committed</a> now. Repo updated.</p><p>/Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Thu, 12 Oct 2017 15:09:41 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=29004#p29004</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28995#p28995</link>
			<description><![CDATA[<p>Hello again,</p><p>As far as I understand the POST values from a checkbox is not set if it is not marked. So why not do this?</p><p>function check_value($name)<br />{<br />&nbsp; &nbsp; return (empty($_POST[$name]) ? 0 : 1);<br />}</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Thu, 12 Oct 2017 09:04:04 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28995#p28995</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28982#p28982</link>
			<description><![CDATA[<p>I will try to fix this.</p><p>Joe</p>]]></description>
			<author><![CDATA[null@example.com (joe)]]></author>
			<pubDate>Tue, 10 Oct 2017 18:18:39 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28982#p28982</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28973#p28973</link>
			<description><![CDATA[<p>@joe: If this works on older PHP versions, it can make it to the core.</p>]]></description>
			<author><![CDATA[null@example.com (apmuthu)]]></author>
			<pubDate>Tue, 10 Oct 2017 14:32:12 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28973#p28973</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28967#p28967</link>
			<description><![CDATA[<p>Hi @kvvaradha,</p><p>Yes, it is with PHP 7.1. </p><p>I have confirmed that is_numeric is a solution.</p><p>function check_value($name)<br />{<br />&nbsp; &nbsp; if (!isset($_POST[$name]) || !is_numeric($_POST[$name]))<br />&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />&nbsp; &nbsp; return 1;<br />}</p><p>I need to leave the debugging on while I work on my own code.</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (PaulShipley)]]></author>
			<pubDate>Tue, 10 Oct 2017 09:29:07 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28967#p28967</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28924#p28924</link>
			<description><![CDATA[<p>The bug you are reporting is throwing on PHP7 and 7.1.&nbsp; If you want to solve the bug go with is_numeric function to check the given value is number or non number. </p><div class="codebox"><pre><code>error_reporting(E_ALL &amp; ~(E_STRICT|E_NOTICE));</code></pre></div><p> to ommit this error by using this one.</p>]]></description>
			<author><![CDATA[null@example.com (kvvaradha)]]></author>
			<pubDate>Sun, 08 Oct 2017 06:50:05 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28924#p28924</guid>
		</item>
		<item>
			<title><![CDATA[Bug in includes\ui\ui_input.inc]]></title>
			<link>https://frontaccounting.com/punbb/viewtopic.php?pid=28923#p28923</link>
			<description><![CDATA[<p>Hi,</p><p>With debugging on I notice a lot of these messages occuring through out the application, for example:</p><p>A non-numeric value encountered in file: C:\Users\Paul\htdocs\fa24\includes\ui\ui_input.inc at line 350<br />C:\Users\Paul\htdocs\fa24\sales\manage\customers.php:330: &nbsp; &nbsp; check_value(&#039;show_inactive&#039;)</p><p>Problem is in function check_vaule</p><p>function check_value($name)<br />{<br />&nbsp; &nbsp; if (!isset($_POST[$name]) || ($_POST[$name]+0) === 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />&nbsp; &nbsp; return 1;<br />}</p><p>And is related to GIT dc449868579dadd4fb918b6a9a7b10ba175d388b</p><p>-&nbsp; &nbsp; if (!isset($_POST[$name]) || $_POST[$name]==&#039;&#039;)<br />+&nbsp; &nbsp; if (!isset($_POST[$name]) || ($_POST[$name]+0) === 0)</p><p>There seems to be three values passed to this function: NULL, &#039;&#039;, &#039;1&#039;. The error is occurring when the check box is not ticked (ie: &#039;&#039;)</p><p>I propose this as a possible solution:</p><p>function check_value($name)<br />{<br />&nbsp; &nbsp; if (!isset($_POST[$name]))<br />&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />&nbsp; &nbsp; if ($_POST[$name] === 0)<br />&nbsp; &nbsp; &nbsp; &nbsp; return 0;<br />&nbsp; &nbsp; return 1;<br />}</p><p>Hope this helps.</p>]]></description>
			<author><![CDATA[null@example.com (PaulShipley)]]></author>
			<pubDate>Sun, 08 Oct 2017 06:07:25 +0000</pubDate>
			<guid>https://frontaccounting.com/punbb/viewtopic.php?pid=28923#p28923</guid>
		</item>
	</channel>
</rss>
