Skip to content

Commit

Permalink
Fix author name length check to handle null values
Browse files Browse the repository at this point in the history
  • Loading branch information
angristan committed Jan 18, 2025
1 parent 4c31779 commit 6bcbdd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Actions/Feed/CreateNewFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function handle(string $requested_feed_url, ?User $attachedUser, ?int $ca
$newFeedEntries = [];

foreach ($entries as $entry) {
if (strlen($entry->get_author()?->get_name()) > 255) {
if (strlen($entry->get_author()?->get_name() ?? '') > 255) {
// 255 is arbitrary, but if the author is that long, it's probably a bug
// example: https://x.com/fuolpit/status/1873790603768553905

Expand Down

0 comments on commit 6bcbdd9

Please sign in to comment.