From fc2db726f2e7ce3f5c5a37004e05752ef8a589e1 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 1 Oct 2021 08:47:18 -0700 Subject: [PATCH] Make sure og:type always has a value. --- e107_plugins/social/e_event.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/e107_plugins/social/e_event.php b/e107_plugins/social/e_event.php index 809e44b06..98c9e6542 100644 --- a/e107_plugins/social/e_event.php +++ b/e107_plugins/social/e_event.php @@ -46,12 +46,18 @@ class social_event { $ogImage = e107::pref('social', 'og_image', false); + if(empty($meta['og:type'])) + { + e107::meta('og:image', 'website'); + } + if(empty($ogImage) || empty($meta) || e_ADMIN_AREA === true) { return null; } // check if we have og:image defined + foreach($meta as $m) { if($m['name'] === 'og:image')