diff --git a/close-old-comments.php b/close-old-comments.php
index 166b036127b1406d8d16ec299c68e095a5570cd0..fbfdd5827978b205d51a2ba58c0d143df45f9f69 100644
--- a/close-old-comments.php
+++ b/close-old-comments.php
@@ -31,7 +31,7 @@ add_filter('option_close_comments_days_old', 'override_close_comments_days_old',
 # which post_types do we need to close automatically after X days?
 # Wordpress defaults to 'posts' (but let's check if got removed and add it back)
 add_filter('close_comments_for_post_types', function ($post_types){
-    if (! in_post_types('post'), $post_types ){
+    if (! in_array('post', $post_types) ){
         $post_types[] = 'post';
     }
     $post_types[] = 'page';