Skip to content

Commit c506a7c

Browse files
authored
Check wether output is set before writeln (#52)
1 parent e0d7b2b commit c506a7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Job/RunSlackMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function execute(InputInterface $input = null, OutputInterface $output =
2323
$message = $this->getMessage();
2424
if ($this->helperData->isEnable()) {
2525
$output ? $output->writeln($this->send($message)) : $this->send($message);
26-
} else {
26+
} elseif ($output !== null) {
2727
$output->writeln(
2828
'<fg=red>This function has been disabled. ' . "\n"
2929
. 'To enable: Go to Stores/Configuration/Catalog/Akeneo Connector/JustBetter Akeneo/Slack and set Enabled to Yes</>'

0 commit comments

Comments
 (0)