php strpos() empty needle warning when a term entry has no url

This commit is contained in:
zotlabs 2018-03-25 21:48:42 -07:00 committed by Mario Vavti
parent f22c7afc59
commit 17e341d245

View File

@ -1491,7 +1491,7 @@ function format_hashtags(&$item) {
$term = htmlspecialchars($t['term'], ENT_COMPAT, 'UTF-8', false) ;
if(! trim($term))
continue;
if(strpos($item['body'], $t['url']))
if($t['url'] && strpos($item['body'], $t['url']))
continue;
if($s)
$s .= ' ';