diff options
author | Mario Vavti <mario@mariovavti.com> | 2022-10-18 12:39:13 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2022-10-18 12:39:13 +0200 |
commit | e9ca17cec14c5a702cc7d656e5206a3c086dd550 (patch) | |
tree | 0770b4274c0e109056199db55429b0801b3ce60c /include/items.php | |
parent | f70956964be5792be296a4e3ec1889a4be2fd475 (diff) | |
download | volse-hubzilla-e9ca17cec14c5a702cc7d656e5206a3c086dd550.tar.gz volse-hubzilla-e9ca17cec14c5a702cc7d656e5206a3c086dd550.tar.bz2 volse-hubzilla-e9ca17cec14c5a702cc7d656e5206a3c086dd550.zip |
fix php warnings
Diffstat (limited to 'include/items.php')
-rw-r--r-- | include/items.php | 6 |
1 files changed, 3 insertions, 3 deletions
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']); |