From 8c10645ba5928a2c255935223be7ac2f48a95503 Mon Sep 17 00:00:00 2001 From: Mark Friedrich Date: Mon, 1 Jan 2018 22:12:47 +0100 Subject: [PATCH] - fixed some cURL errors for not existing discord map configuration --- app/main/model/mapmodel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/model/mapmodel.php b/app/main/model/mapmodel.php index f5300c0d5..e9526d594 100644 --- a/app/main/model/mapmodel.php +++ b/app/main/model/mapmodel.php @@ -1110,7 +1110,7 @@ public function getSlackWebHookConfig(string $channel = ''): \stdClass{ $config->slackWebHookURL = $this->slackWebHookURL; $config->slackUsername = $this->slackUsername; $config->slackIcon = $this->slackIcon; - if($channel && $this->exists($channel)){ + if($channel && $this->exists($channel) && !empty($this->$channel)){ $config->slackChannel = $this->$channel; } return $config; @@ -1124,7 +1124,7 @@ public function getSlackWebHookConfig(string $channel = ''): \stdClass{ public function getDiscordWebHookConfig(string $channel = ''): \stdClass { $config = (object) []; $config->slackUsername = $this->discordUsername; - if($channel && $this->exists($channel)){ + if($channel && $this->exists($channel) && !empty($this->$channel)){ $config->slackWebHookURL = $this->$channel . '/slack'; } return $config;