Skip to content

Commit

Permalink
Merge pull request #116 from newfold-labs/fix/PRESS10-60
Browse files Browse the repository at this point in the history
Fix  PHP Warning:  Attempt to read property "public" on null
  • Loading branch information
wpscholar authored Dec 19, 2024
2 parents ee5d861 + 147a079 commit 12801b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Listeners/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function post_status( $new_status, $old_status, $post ) {
/**
* Ignore all post types that aren't public
*/
if ( $post_type->public !== true ) {
if ( ! $post_type || $post_type->public !== true ) {
return;
}

Expand Down

0 comments on commit 12801b8

Please sign in to comment.