From 2fc3f381ac3486e8c4910e70a3933a4b6718ba19 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 25 Mar 2018 21:48:42 -0700 Subject: php strpos() empty needle warning when a term entry has no url --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index c1e064857..f9cefd020 100644 --- a/include/text.php +++ b/include/text.php @@ -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 .= ' '; -- cgit v1.2.3