We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea5d314 commit 846b801Copy full SHA for 846b801
src/Comment_Command.php
@@ -791,7 +791,7 @@ static function ( $id ) use ( $exclude_list ) {
791
/**
792
* Gets all available comment IDs.
793
*/
794
- private function get_all_comment_ids(): array|int {
+ private function get_all_comment_ids(): array {
795
$query = new WP_Comment_Query();
796
$comments = $query->query(
797
array(
@@ -800,6 +800,10 @@ private function get_all_comment_ids(): array|int {
800
)
801
);
802
803
+ if (!is_array($comments)) {
804
+ return [];
805
+ }
806
+
807
return $comments;
808
}
809
0 commit comments