<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — A non-numeric value encountered in \includes\date_functions.inc]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=8034&amp;type=atom" />
	<updated>2019-03-07T05:08:47Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=8034</id>
		<entry>
			<title type="html"><![CDATA[Re: A non-numeric value encountered in \includes\date_functions.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34424#p34424" />
			<content type="html"><![CDATA[<p>Thanks for the quick fix Joe.</p><p>FYI. This was with PHP 7.2.15 on Windows 10 with XAMPP 7.2.15 (2019/03/01)</p><p>@apmuthu</p><p>Mmm formats (like format 5 - YYYYMmmDD) are even clear to our American friends, whereas 03/04 could be 4th of March or 3rd of April. :-)</p>]]></content>
			<author>
				<name><![CDATA[PaulShipley]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20029</uri>
			</author>
			<updated>2019-03-07T05:08:47Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34424#p34424</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A non-numeric value encountered in \includes\date_functions.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34417#p34417" />
			<content type="html"><![CDATA[<p>@PaulShipley</p><p>This was a PHP 7.X error. Thanks for finding this and showing the resolution.</p><p>Committed to repo. The fixed file can be downloaded <a href="https://sourceforge.net/p/frontaccounting/git/ci/master/tree/includes/date_functions.inc">here</a>.</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-03-06T22:00:38Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34417#p34417</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A non-numeric value encountered in \includes\date_functions.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34416#p34416" />
			<content type="html"><![CDATA[<p>Which PHP-version is used?</p><p>Joe</p>]]></content>
			<author>
				<name><![CDATA[joe]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=3</uri>
			</author>
			<updated>2019-03-06T18:10:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34416#p34416</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: A non-numeric value encountered in \includes\date_functions.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34412#p34412" />
			<content type="html"><![CDATA[<p>@joe: should this be included? Never seen such a date format in practical use though!</p>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2019-03-06T17:12:18Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34412#p34412</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[A non-numeric value encountered in \includes\date_functions.inc]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=34404#p34404" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I am getting numerous non-numeric value errors in date_functions.inc line 399 (like below).</p><p>A non-numeric value encountered in file: D:\Users\shipl\htdocs\fa24\includes\date_functions.inc at line 399<br />D:\Users\shipl\htdocs\fa24\includes\date_functions.inc:531: &nbsp; &nbsp; date2sql(&#039;2019/Mar/5&#039;)<br />D:\Users\shipl\htdocs\fa24\includes\references.inc:125: &nbsp; &nbsp; explode_date_to_dmy(&#039;2019/Mar/5&#039;)<br />D:\Users\shipl\htdocs\fa24\includes\references.inc:252: &nbsp; &nbsp; (references Object)-&gt;_parse_next(&#039;1&#039;,&#039;&#039;,(Array[3]))<br />D:\Users\shipl\htdocs\fa24\gl\gl_bank.php:203: &nbsp; &nbsp; (references Object)-&gt;get_next(&#039;1&#039;,&#039;&#039;,&#039;&#039;)<br />D:\Users\shipl\htdocs\fa24\gl\gl_bank.php:35: &nbsp; &nbsp; create_cart(&#039;1&#039;,&#039;0&#039;)</p><p>This issue seems to be due to the handling of non-numeric months (like in date formats 3,4,5). I am using date format 5 (YYYYMmmDD - 2019/Mar/5) in \includes\date_functions.inc</p><br /><p>&nbsp; &nbsp; if ($year+$day+$month) {<br />&nbsp; &nbsp; &nbsp; &nbsp; if ($how &gt; 2)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; global $tmonths;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $month = array_search($month, $tmonths);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>I believe that this should be</p><p>&nbsp; &nbsp; if ($how &gt; 2)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; global $tmonths;<br />&nbsp; &nbsp; &nbsp; &nbsp; $month = array_search($month, $tmonths);<br />&nbsp; &nbsp; }</p><p>&nbsp; &nbsp; if ($year+$day+$month) {</p><p>The patch file is</p><p>399,404d398<br />&lt; &nbsp; &nbsp; if ($how &gt; 2)<br />&lt; &nbsp; &nbsp; {<br />&lt; &nbsp; &nbsp; &nbsp; &nbsp; global $tmonths;<br />&lt; &nbsp; &nbsp; &nbsp; &nbsp; $month = array_search($month, $tmonths);<br />&lt; &nbsp; &nbsp; }<br />&lt; <br />406c400,405<br />&lt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //to modify assumption in 2030<br />---<br />&gt; &nbsp; &nbsp; &nbsp; &nbsp; if ($how &gt; 2)<br />&gt; &nbsp; &nbsp; &nbsp; &nbsp; {<br />&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; global $tmonths;<br />&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $month = array_search($month, $tmonths);<br />&gt; &nbsp; &nbsp; &nbsp; &nbsp; }<br />&gt; &nbsp; &nbsp; &nbsp; &nbsp; //to modify assumption in 2030</p><p>Hope this helps</p>]]></content>
			<author>
				<name><![CDATA[PaulShipley]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=20029</uri>
			</author>
			<updated>2019-03-05T03:00:20Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=34404#p34404</id>
		</entry>
</feed>
