]> git.mxchange.org Git - friendica.git/commitdiff
Changed to null-coalscing style (??) as sugguested by @MrPetovan
authorRoland Häder <roland@mxchange.org>
Thu, 16 Jun 2022 14:59:54 +0000 (16:59 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 16 Jun 2022 14:59:54 +0000 (16:59 +0200)
src/Protocol/ActivityPub/Processor.php

index 077ba3e3fe9f75ce940b2b2d3fa142ea0967decf..311806f8c07bcb71917abbd15467ff7a082195ed 100644 (file)
@@ -616,8 +616,8 @@ class Processor
                        $content = $activity['content'];
                } else {
                        // By default assume "text/html"
-                       $item['title'] = (!empty($activity['name']) ? HTML::toBBCode($activity['name']) : '');
-                       $content = (!empty($activity['content']) ? HTML::toBBCode($activity['content']) : '');
+                       $item['title'] = HTML::toBBCode($activity['name'] ??: '');
+                       $content = HTML::toBBCode($activity['content'] ?? : '');
                }
 
                $item['title'] = trim(BBCode::toPlaintext($item['title']));
@@ -651,7 +651,7 @@ class Processor
 
                                $content = self::removeImplicitMentionsFromBody($content, $parent);
                        }
-                       $item['content-warning'] = (!empty($activity['summary']) ? HTML::toBBCode($activity['summary']) : '');
+                       $item['content-warning'] = HTML::toBBCode($activity['summary'] ?? '');
                        $item['raw-body'] = $item['body'] = $content;
                }