{"id":16052166,"date":"2022-09-28T16:35:20","date_gmt":"2022-09-28T16:35:20","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-8-errors-7\/"},"modified":"2022-09-28T16:35:20","modified_gmt":"2022-09-28T16:35:20","slug":"php-8-errors-7","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-8-errors-7\/","title":{"rendered":"PHP 8 errors"},"content":{"rendered":"<p>Hi,<\/p>\n<p>Since PHP 8, undefined array keys have changed from notices to warnings which raises Exceptions in various situations and setups.<\/p>\n<p>There are multiple undefined array keys accessed in admin\/admin.php, especially on line 658 and 659. I&#8217;ve had to fix it with the null coalesce operator to be able to  save my Tag Manager id.<\/p>\n<pre><code>\n$container_on_off = (bool) ($options[&#039;container-on&#039;] ?? false);\n$container_compat = (int) ($options[&#039;compat-mode&#039;] ?? 0);\n<\/code><\/pre>\n<p>Hope this helps for others stumbling onto this error and hope the plugin is updated and tested for php 8 soon.<\/p>\n<p>Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-16052166","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16052166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/16052166\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=16052166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}