<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>エラー解決  |  ぼちぼちブログ</title>
	<atom:link href="https://horumont.info/tag/%E3%82%A8%E3%83%A9%E3%83%BC%E8%A7%A3%E6%B1%BA/feed/" rel="self" type="application/rss+xml" />
	<link>https://horumont.info</link>
	<description>教育／労働組合／プログラミング</description>
	<lastBuildDate>Sun, 17 Oct 2021 01:13:01 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.8</generator>

<image>
	<url>https://horumont.info/wp-content/uploads/2020/11/39cab8f0a1adc1a8ac2842b4a25f1e52-100x100.png</url>
	<title>エラー解決  |  ぼちぼちブログ</title>
	<link>https://horumont.info</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>php warning: Trying to access array offset on value of type null in というエラーに対応できないかという相談を受けて解決した話</title>
		<link>https://horumont.info/programming/php-warning/</link>
					<comments>https://horumont.info/programming/php-warning/#respond</comments>
		
		<dc:creator><![CDATA[ほるもんT]]></dc:creator>
		<pubDate>Sun, 17 Oct 2021 01:11:47 +0000</pubDate>
				<category><![CDATA[プログラミング]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[エラー解決]]></category>
		<guid isPermaLink="false">https://horumont.info/?p=570</guid>

					<description><![CDATA[先日、ツイッターでつながっているWordPressブログを運営している人から DMをいただきました。 「このエラーに対応できますか？」ということでした。 とっちらかっていろいろ学習していて、 現在は、WordPressの [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>先日、ツイッターでつながっているWordPressブログを運営している人から DMをいただきました。 「このエラーに対応できますか？」ということでした。</p>



<p>とっちらかっていろいろ学習していて、 現在は、WordPressのオリジナルテーマ開発をしているので そのあたりで連絡頂いたということでした。</p>



<p>正直なところ、解決できる自信はありませんでしたが、 エラー解決は嫌いではないのでzoomでコードを見せてもらいつつ対応。</p>



<p>コメントの日付表示の後ろに、このエラーメッセージが出てきていました。 nullの変数に配列型でアクセスしているよ！ということはわかりました。 ぐぐると、すぐにいろいろ記事が出てきました。 このエラーメッセージがレンダリングされているってのも気になったのですが、 とりあえず、この変数にアクセスする前に、 それがnullでなくて、値がセットされているかどうかを判定する <code>isset()</code>で解決できそうでした。</p>



<p>市販の有料テーマのコードだったので、 とても複雑だったのですが、エラー時の表示や吐き出されたHTMLを見たりして、 「ここか！」というところを発見したので、 そこに <code>isset()</code>をかませるととりあえずエラー表示が消えました！</p>



<p>エラーが解決できるとやはり嬉しいです。</p>



<p>参考： <a rel="noopener" target="_blank" href="https://www.php.net/manual/ja/function.isset.php">PHPドキュメント</a> <a rel="noopener" target="_blank" href="https://office-obata.com/report/memorandum/post-5200/">OFFICE OBATA様</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://horumont.info/programming/php-warning/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
