{"id":18837090,"date":"2026-03-01T01:43:04","date_gmt":"2026-03-01T01:43:04","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-warning-563\/"},"modified":"2026-03-01T01:43:04","modified_gmt":"2026-03-01T01:43:04","slug":"php-warning-563","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-warning-563\/","title":{"rendered":"PHP Warning"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>Hi Nick,<br \/><br \/>I wanted to share a repeating issue I've seen in my PHP Error logs with Featured Audio:<br \/><br \/>PHP Warning: Undefined property: stdClass::$publish in \/public\/wp-content\/plugins\/featured-audio\/featured-audio-recent-playlist-widget.php on line 80<br \/><br \/>That line is:\u00a0<br \/><br \/>$total_pieces = wp_count_posts( 'any' )-&gt;publish;<br \/><br \/>I asked ChatGPT how to fix it and it said to replace that line with:<br \/><br \/>$count_obj = wp_count_posts( 'post' );<br \/><br \/>$total_pieces = isset( $count_obj-&gt;publish ) ? $count_obj-&gt;publish : 0;<br \/><br \/>This change resolved the issue and no further errors are logged.<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-18837090","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18837090","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\/18837090\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18837090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}