custom-post-type-permalinks icon indicating copy to clipboard operation
custom-post-type-permalinks copied to clipboard

fix: fix PHP notices

Open sectsect opened this issue 6 months ago • 0 comments

失礼いたします。

get_term_link()post_tag を渡すと以下のラインでNoticeが出力されるようです。

e.g. get_term_link( 11, 'post_tag' );

https://github.com/torounit/custom-post-type-permalinks/blob/bb0a66cae01a61db13a1de1cc1679d63ac35f367/CPTP/Module/Permalink.php#L406-L407

[09-Dec-2023 08:10:17 UTC] PHP Notice:  Trying to access array offset on value of type bool in /xxxxxxxxx/wp-content/plugins/custom-post-type-permalinks/CPTP/Module/Permalink.php on line 407
[09-Dec-2023 08:10:17 UTC] PHP Notice:  Trying to access array offset on value of type bool in /xxxxxxxxx/wp-content/plugins/custom-post-type-permalinks/CPTP/Module/Permalink.php on line 406

このPRはこちらのNoticeを解消するものです。

一度ご確認いただけないでしょうか。 よろしくお願いいたします。

sectsect avatar Dec 09 '23 08:12 sectsect