<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Bug in includes\ui\ui_input.inc]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=7021&amp;type=atom" />
	<updated>2017-10-12T15:09:41Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=7021</id>
		<entry>
			<title type="html"><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=29004#p29004" />
			<content type="html"><![CDATA[<p>This change has been <a href="https://github.com/FrontAccountingERP/FA/commit/9549235b87720c573a2f1e2144d5a1bb55e6e8fc">committed</a> now. Repo updated.</p><p>/Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-10-12T15:09:41Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=29004#p29004</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28995#p28995" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-10-12T09:04:04Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28995#p28995</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28982#p28982" />
			<content type="html"><![CDATA[<p>I will try to fix this.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2017-10-10T18:18:39Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28982#p28982</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28973#p28973" />
			<content type="html"><![CDATA[<p>@joe: If this works on older PHP versions, it can make it to the core.</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2017-10-10T14:32:12Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28973#p28973</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28967#p28967" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[PaulShipley]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20029</uri>
			</author>
			<updated>2017-10-10T09:29:07Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28967#p28967</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Bug in includes\ui\ui_input.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28924#p28924" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[kvvaradha]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=19348</uri>
			</author>
			<updated>2017-10-08T06:50:05Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28924#p28924</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Bug in includes\ui\ui_input.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=28923#p28923" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[PaulShipley]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20029</uri>
			</author>
			<updated>2017-10-08T06:07:25Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=28923#p28923</id>
		</entry>
</feed>
