From f29fef2bac4c458c01274ac8989b9438722fa826 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 6 Nov 2023 07:56:43 -0500 Subject: [PATCH] Do not render the pdf_url metatag if there is no value (#985) * Do not render the pdf_url metatag if there is no value * Always return a string --- islandora.tokens.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/islandora.tokens.inc b/islandora.tokens.inc index ab7bb0736..f528dee3d 100644 --- a/islandora.tokens.inc +++ b/islandora.tokens.inc @@ -134,7 +134,7 @@ function islandora_tokens($type, $tokens, array $data, array $options, Bubbleabl break; case 'pdf_url': - $replacements[$original] = ' ' . islandora_url_to_service_file_media_by_mimetype($data['node'], 'application/pdf'); + $replacements[$original] = islandora_url_to_service_file_media_by_mimetype($data['node'], 'application/pdf'); break; } } @@ -188,4 +188,5 @@ function islandora_url_to_service_file_media_by_mimetype($node, $mime_type) { } } } + return ''; }