Do not render images or social icons if image src is not defined

This commit is contained in:
Tautvidas Sipavičius
2016-08-12 16:18:44 +03:00
parent 62023397f4
commit 87332037c2
3 changed files with 38 additions and 2 deletions

View File

@@ -6,6 +6,10 @@ use MailPoet\Newsletter\Renderer\StylesHelper;
class Image {
static function render($element, $column_count) {
if(empty($element['src'])) {
return '';
}
$element['width'] = (int)$element['width'];
$element['height'] = (int)$element['height'];
$element = self::adjustImageDimensions($element, $column_count);