<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: PHP 7.1 Warnings: Illegal String Offset + Cannot Assign Empty String To String Offset (working fine in PHP 7.0 and lower)	</title>
	<atom:link href="https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/feed/" rel="self" type="application/rss+xml" />
	<link>https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/</link>
	<description>phones ● computers ● audio ● video ● technology</description>
	<lastBuildDate>Fri, 17 Sep 2021 17:53:14 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: TehnoBlog		</title>
		<link>https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-347</link>

		<dc:creator><![CDATA[TehnoBlog]]></dc:creator>
		<pubDate>Sat, 22 Dec 2018 15:34:00 +0000</pubDate>
		<guid isPermaLink="false">https://tehnoblog.org/?p=3726#comment-347</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-346&quot;&gt;mitra&lt;/a&gt;.

Hi mitra,
I am sorry, but your code was not received here, only last few lines partially. You can paste your code on &lt;a href=&quot;https://pastebin.com/&quot; target=&quot;_blank&quot; rel=&quot;nofollow noreferrer noopener&quot;&gt;pastebin.com&lt;/a&gt; (for example), then I might be able to help you.

Your line number #40 (whatever was on it, I cannot tell, as I did not see it) calls for element in array which does not exist. That&#039;s the outline of the &quot;error&quot; (warning) in a nutshell. Check if you properly defined that element earlier in your code.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-346">mitra</a>.</p>
<p>Hi mitra,<br />
I am sorry, but your code was not received here, only last few lines partially. You can paste your code on <a href="https://pastebin.com/" target="_blank" rel="nofollow noreferrer noopener">pastebin.com</a> (for example), then I might be able to help you.</p>
<p>Your line number #40 (whatever was on it, I cannot tell, as I did not see it) calls for element in array which does not exist. That&#8217;s the outline of the &#8220;error&#8221; (warning) in a nutshell. Check if you properly defined that element earlier in your code.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: mitra		</title>
		<link>https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-346</link>

		<dc:creator><![CDATA[mitra]]></dc:creator>
		<pubDate>Sat, 22 Dec 2018 15:04:31 +0000</pubDate>
		<guid isPermaLink="false">https://tehnoblog.org/?p=3726#comment-346</guid>

					<description><![CDATA[I write this code and encounter a problem as i mentioned bellow. how can i fix it.

&lt;em&gt;(incomplete code - removed by editor)&lt;/em&gt;
	
Warning: Illegal string offset &#039;Math&#039; in C:\xampp\htdocs\raz\php1\incs\test1-1.php on line 40]]></description>
			<content:encoded><![CDATA[<p>I write this code and encounter a problem as i mentioned bellow. how can i fix it.</p>
<p><em>(incomplete code &#8211; removed by editor)</em></p>
<p>Warning: Illegal string offset &#8216;Math&#8217; in C:\xampp\htdocs\raz\php1\incs\test1-1.php on line 40</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: ubrain		</title>
		<link>https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-269</link>

		<dc:creator><![CDATA[ubrain]]></dc:creator>
		<pubDate>Mon, 25 Jun 2018 22:58:57 +0000</pubDate>
		<guid isPermaLink="false">https://tehnoblog.org/?p=3726#comment-269</guid>

					<description><![CDATA[This was a simple question, but googling lead me to a clear and proper answer... here :-)

So BIG thanks!]]></description>
			<content:encoded><![CDATA[<p>This was a simple question, but googling lead me to a clear and proper answer&#8230; here :-)</p>
<p>So BIG thanks!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: TehnoBlog		</title>
		<link>https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-262</link>

		<dc:creator><![CDATA[TehnoBlog]]></dc:creator>
		<pubDate>Tue, 29 May 2018 10:20:46 +0000</pubDate>
		<guid isPermaLink="false">https://tehnoblog.org/?p=3726#comment-262</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-261&quot;&gt;obed&lt;/a&gt;.

Is &lt;strong&gt;$ph&lt;/strong&gt; variable initialized as an (array) in the first place? If it is, then this issue is not related to this, but from the fact that key &lt;strong&gt;&#039;ph_id&#039;&lt;/strong&gt; does not exist inside of it.

While you can solve this very easily with isset(), for example:

&lt;code&gt;if (isset($ph[&#039;ph_id&#039;])) {
  sum_paidPHs($ph[&#039;ph_id&#039;]);
}&lt;/code&gt;

However, if &lt;strong&gt;$ph[&#039;ph_id&#039;]&lt;/strong&gt; being not set is abnormal case, you have to go earlier in the code and examine what&#039;s causing it.

Hope this helps!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-261">obed</a>.</p>
<p>Is <strong>$ph</strong> variable initialized as an (array) in the first place? If it is, then this issue is not related to this, but from the fact that key <strong>&#8216;ph_id&#8217;</strong> does not exist inside of it.</p>
<p>While you can solve this very easily with isset(), for example:</p>
<p><code>if (isset($ph['ph_id'])) {<br />
  sum_paidPHs($ph['ph_id']);<br />
}</code></p>
<p>However, if <strong>$ph[&#8216;ph_id&#8217;]</strong> being not set is abnormal case, you have to go earlier in the code and examine what&#8217;s causing it.</p>
<p>Hope this helps!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: obed		</title>
		<link>https://tehnoblog.org/php-7-1-warnings-illegal-string-offset-cannot-assign-empty-string-to-string-offset-working-fine-in-php-7-0-and-lower/#comment-261</link>

		<dc:creator><![CDATA[obed]]></dc:creator>
		<pubDate>Tue, 29 May 2018 06:49:15 +0000</pubDate>
		<guid isPermaLink="false">https://tehnoblog.org/?p=3726#comment-261</guid>

					<description><![CDATA[i have this block of code which gives me this error 

&quot; PHP Warning:  Illegal string offset &#039;ph_id&#039; in /user/help.php on line 203&quot; 

how can i solve this????

&lt;code&gt;&#060;?php
sum_paidPHs($ph[&#039;ph_id&#039;]);
?&#062;
&lt;/code&gt;]]></description>
			<content:encoded><![CDATA[<p>i have this block of code which gives me this error </p>
<p>&#8221; PHP Warning:  Illegal string offset &#8216;ph_id&#8217; in /user/help.php on line 203&#8243; </p>
<p>how can i solve this????</p>
<p><code>&lt;?php<br />
sum_paidPHs($ph['ph_id']);<br />
?&gt;<br />
</code></p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
