From 147a079f6db3fc486544e641f035e36f60dd4b0f Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Brito Date: Fri, 13 Dec 2024 12:15:45 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20=20PHP=20Warning:=C2=A0=20Attempt=20to=20?= =?UTF-8?q?read=20property=20"public"=20on=20null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/Listeners/Content.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Listeners/Content.php b/includes/Listeners/Content.php index 6e16d22..e5c7c05 100644 --- a/includes/Listeners/Content.php +++ b/includes/Listeners/Content.php @@ -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; }