PHPCI/Plugin/Xmpp.php : Use implode() method instead of foreach() to build recipients for command
This commit is contained in:
parent
a262af8ee2
commit
05ba6df964
|
@ -189,15 +189,11 @@ class XMPP implements \PHPCI\Plugin
|
|||
* Send XMPP notification for all recipients
|
||||
*/
|
||||
$cmd = $sendxmpp . "%s -f .sendxmpprc -m %s %s";
|
||||
$recipients = '';
|
||||
foreach($this->recipients as $recipient) {
|
||||
if(!empty($recipients))
|
||||
$recipients .= ' ';
|
||||
$recipients .= $recipient;
|
||||
}
|
||||
$recipients = implode(' ', $this->recipients);
|
||||
|
||||
$success = $this->phpci->executeCommand(
|
||||
$cmd, $tls, $message_file, $recipients);
|
||||
|
||||
print $this->phpci->getLastOutput();
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue