From 5b80d57a542da0aa221dd69bf6c7f8d6af04956c Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 10 May 2023 20:40:10 +0000 Subject: php warning --- include/feedutils.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/feedutils.php') diff --git a/include/feedutils.php b/include/feedutils.php index b657c28d0..a2d52c698 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -1829,11 +1829,11 @@ function atom_author($tag, $nick, $name, $uri, $h, $w, $type, $photo) { */ function atom_render_author($tag, $xchan) { - $nick = xmlify(substr($xchan['xchan_addr'], 0, strpos($xchan['xchan_addr'], '@'))); - $id = xmlify($xchan['xchan_url']); - $name = xmlify($xchan['xchan_name']); - $photo = xmlify($xchan['xchan_photo_l']); - $type = xmlify($xchan['xchan_photo_mimetype']); + $nick = ((!empty($xchan['xchan_addr'])) ? xmlify(substr($xchan['xchan_addr'], 0, strpos($xchan['xchan_addr'], '@'))) : ''); + $id = ((!empty($xchan['xchan_url'])) ? xmlify($xchan['xchan_url']) : ''); + $name = ((!empty($xchan['xchan_name'])) ? xmlify($xchan['xchan_name']) : ''); + $photo = ((!empty($xchan['xchan_photo_l'])) ? xmlify($xchan['xchan_photo_l']) : ''); + $type = ((!empty($xchan['xchan_photo_mimetype'])) ? xmlify($xchan['xchan_photo_mimetype']) : ''); $w = $h = 300; $o = "<$tag>\r\n"; -- cgit v1.2.3