From 05ba6df96444fecf0ea2f24f17f3956558d375fb Mon Sep 17 00:00:00 2001 From: Alexandre Russo Date: Wed, 21 May 2014 21:57:40 +0200 Subject: [PATCH] PHPCI/Plugin/Xmpp.php : Use implode() method instead of foreach() to build recipients for command --- PHPCI/Plugin/Xmpp.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/PHPCI/Plugin/Xmpp.php b/PHPCI/Plugin/Xmpp.php index 25ddbeee..5de3106b 100644 --- a/PHPCI/Plugin/Xmpp.php +++ b/PHPCI/Plugin/Xmpp.php @@ -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(); /*