{"id":15424207,"date":"2022-03-03T20:51:51","date_gmt":"2022-03-03T20:51:51","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/generating-huge-debug\/"},"modified":"2022-03-03T20:51:51","modified_gmt":"2022-03-03T20:51:51","slug":"generating-huge-debug","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/generating-huge-debug\/","title":{"rendered":"Generating huge debug"},"content":{"rendered":"<p>This plugin is generating a <strong>lot<\/strong> of PHP Notices due to one line in the code&#8230; is there any way to fix this? I am getting dozens of PHP Notices logged into my debug.log from this plugin, and all of the Notices say:<\/p>\n<p><code>PHP Notice:  Undefined index: hiddenblock in \/path\/to\/install\/wp-content\/plugins\/hide-block\/hide-block.php on line 73<\/code><\/p>\n<p>Which looks like it&#8217;s referring to the part in your plugin&#8217;s code which reads:<\/p>\n<pre><code>\/\/ Dynamic Return Contents\nfunction hideblock_plugin_frontend( $block_content, $block ) {\n\tif( $block[&#039;attrs&#039;][&#039;hiddenblock&#039;] ) {\n\t\treturn null;\n\t} else {\n\t\treturn $block_content;\n\t}\n}\nadd_filter( &#039;render_block&#039;, &#039;hideblock_plugin_frontend&#039;, 10, 3);<\/code><\/pre>\n<p>What can be modified about the code to resolve this and stop the Notices?<br \/>\nThanks!<\/p>\n","protected":false},"template":"","class_list":["post-15424207","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15424207","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\/15424207\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15424207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}