diff --git a/disqus/rest-api/class-disqus-rest-api.php b/disqus/rest-api/class-disqus-rest-api.php index 01b4a53..aa1d433 100644 --- a/disqus/rest-api/class-disqus-rest-api.php +++ b/disqus/rest-api/class-disqus-rest-api.php @@ -786,7 +786,8 @@ private function comment_data_from_post( $post ) { if ( isset( $author['email'] ) ) { $author_email = $author['email']; } elseif ( isset( $author['isAnonymous'] ) && $author['isAnonymous'] ) { - $author_email = 'anonymized-' . md5( $author['name'] ) . '@disqus.com'; + $author_name = isset( $author['name'] ) && null !== $author['name'] ? $author['name'] : 'anonymous'; + $author_email = 'anonymized-' . md5( $author_name ) . '@disqus.com'; } elseif ( isset( $author['id'] ) ) { $author_email = 'user-' . $author['id'] . '@disqus.com'; }