- printf("\t\t".'<link rel="enclosure" type="%s" length="%d" href="%s" />'."\n",
- 'image/jpeg', filesize($article->thumb), "$siteref/{$article->thumb}"
+ printf("\t\t".'<link rel="enclosure" type="%s" href="%s"%s />'."\n",
+ 'image/jpeg',
+ "$siteref/{$article->thumb}",
+ file_exists($article->thumb) ? sprintf(' length="%d"', filesize($article->thumb)) : ''