diff options
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php index 8ac6d791f..fec02a74f 100644 --- a/include/text.php +++ b/include/text.php @@ -2652,7 +2652,7 @@ function xchan_query(&$items, $abook = true, $effective_uid = 0) { $arr[] = "'" . dbesc($item['owner_xchan']) . "'"; if($item['author_xchan'] && (! in_array("'" . dbesc($item['author_xchan']) . "'",$arr))) $arr[] = "'" . dbesc($item['author_xchan']) . "'"; - if($item['source_xchan'] && (! in_array("'" . dbesc($item['source_xchan']) . "'",$arr))) + if(!empty($item['source_xchan']) && (! in_array("'" . dbesc($item['source_xchan']) . "'",$arr))) $arr[] = "'" . dbesc($item['source_xchan']) . "'"; } } @@ -2677,7 +2677,9 @@ function xchan_query(&$items, $abook = true, $effective_uid = 0) { for($x = 0; $x < count($items); $x ++) { $items[$x]['owner'] = find_xchan_in_array($items[$x]['owner_xchan'],$chans); $items[$x]['author'] = find_xchan_in_array($items[$x]['author_xchan'],$chans); - $items[$x]['source'] = find_xchan_in_array($items[$x]['source_xchan'],$chans); + if (!empty($items[$x]['source_xchan'])) { + $items[$x]['source'] = find_xchan_in_array($items[$x]['source_xchan'],$chans); + } } } } |