From baaabadd69298f4887067dd76257029dfb05f46c Mon Sep 17 00:00:00 2001 From: Jellyfrog Date: Fri, 31 Jul 2020 14:40:57 +0200 Subject: [PATCH] Fix for deleted github users --- LibreNMS/Util/GitHub.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LibreNMS/Util/GitHub.php b/LibreNMS/Util/GitHub.php index 98117fcaa3..9281000d4a 100644 --- a/LibreNMS/Util/GitHub.php +++ b/LibreNMS/Util/GitHub.php @@ -234,6 +234,11 @@ GRAPHQL; } } + // If the Gihub profile doesnt exist anymore, the author is null + if(empty($pr['author'])) { + $pr['author'] = ['login' => 'ghost', 'url' => 'https://github.com/ghost']; + } + // only add the changelog if it isn't set to ignore if (!in_array('ignore changelog', $pr['labels'])) { $title = addcslashes(ucfirst(trim(preg_replace('/^[\S]+: /', '', $pr['title']))), '<>');