Skip to content

Commit

Permalink
Merge pull request #574 from exodus4d/develop
Browse files Browse the repository at this point in the history
- fixed some cURL errors for not existing discord map configuration
  • Loading branch information
exodus4d authored Jan 1, 2018
2 parents c6fad42 + 8c10645 commit 5c91bb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/main/model/mapmodel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 5c91bb6

Please sign in to comment.