$text .= " title='" . $data['title'] . "'";
}
+ if (empty($data['text'])) {
+ $data['text'] = '';
+ }
+
// Only embedd a picture link when it seems to be a valid picture ("width" is set)
if (!empty($data['images']) && !empty($data['images'][0]['width'])) {
$preview = str_replace(['[', ']'], ['[', ']'], htmlentities($data['images'][0]['src'], ENT_QUOTES, 'UTF-8', false));
}
}
- $text .= ']' . $data['text'] ?? '' . '[/attachment]';
+ $text .= ']' . $data['text'] . '[/attachment]';
$hashtags = '';
if (!empty($data['keywords'])) {