* @param string $preview Preview image URL
* @param string $description
* @return string
- */ public static function getBBCodeByUrl(string $photo, string $preview = null, string $description = ''): string
+ */ public static function getBBCodeByUrl(string $photo, string $preview = null, string $description = null): string
{
if (!empty($preview)) {
return '[url=' . $photo . '][img=' . $preview . ']' . $description . '[/img][/url]';