1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 17:39:46 +01:00

Fix for og:image on news items.

This commit is contained in:
Cameron 2017-06-26 14:33:49 -07:00
parent 86044e143c
commit 018dc53f06

View File

@ -461,11 +461,11 @@ class news_front
$tmp = explode(",", $iurl); $tmp = explode(",", $iurl);
foreach($tmp as $mimg) foreach($tmp as $mimg)
{ {
if(substr($mimg,-8) == '.youtube') if(substr($mimg,-8) == '.youtube' || empty($mimg))
{ {
continue; continue;
} }
e107::meta('og:image',$tp->thumbUrl($tmp[0],'w=500',false,true) ); e107::meta('og:image',$tp->thumbUrl($mimg,'w=500',false,true) );
// e107::meta('og:image',$mimg); // e107::meta('og:image',$mimg);
} }