Skip to content
Snippets Groups Projects
Commit dd45c9fe authored by Philippe Joulot's avatar Philippe Joulot
Browse files

Issue #3467716 by phjou: Warning body is empty

parent d45c5536
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ function token_body_image_tokens($type, $tokens, array $data, array $options, Bu
foreach ($tokens as $name => $original) {
switch ($name) {
case 'body_image_url':
$body = $node->get('body')->getValue();
$body = (!empty($body)) ? $body[0]['value'] : NULL;
$body = $body[0]['value'];
if (!empty($body)) {
$dom = new DOMDocument();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment