From e9ca17cec14c5a702cc7d656e5206a3c086dd550 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 18 Oct 2022 12:39:13 +0200 Subject: fix php warnings --- include/items.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include/items.php') diff --git a/include/items.php b/include/items.php index bf81cf56d..28b311021 100644 --- a/include/items.php +++ b/include/items.php @@ -1030,20 +1030,20 @@ function import_author_unknown($x) { return $r[0]['xchan_hash']; } - $name = trim($x['name']); + $name = ((isset($x['name'])) ? trim($x['name']) : 'Unknown'); $r = xchan_store_lowlevel( [ 'xchan_hash' => $x['url'], 'xchan_guid' => $x['url'], 'xchan_url' => $x['url'], - 'xchan_name' => (($name) ? $name : t('(Unknown)')), + 'xchan_name' => $name, 'xchan_name_date' => datetime_convert(), 'xchan_network' => 'unknown' ] ); - if($r && $x['photo']) { + if($r && isset($x['photo']) && $x['photo']) { $photos = import_xchan_photo($x['photo']['src'],$x['url']); -- cgit v1.2.3