cvs: pear /Mail/Mail smtp.php

From: Date: Thu, 09 Sep 2004 02:22:14 +0000
Subject: cvs: pear /Mail/Mail smtp.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-23740@lists.php.net to get a copy of this message
chagenbu Wed Sep 8 22:22:14 2004 EDT Modified files: /pear/Mail/Mail smtp.php Log: Looks like I had this php5 fix around and forgot to commit it a day or so ago. http://cvs.php.net/diff.php/pear/Mail/Mail/smtp.php?r1=1.17&r2=1.18&ty=u Index: pear/Mail/Mail/smtp.php diff -u pear/Mail/Mail/smtp.php:1.17 pear/Mail/Mail/smtp.php:1.18 --- pear/Mail/Mail/smtp.php:1.17 Wed Sep 8 22:08:55 2004 +++ pear/Mail/Mail/smtp.php Wed Sep 8 22:22:14 2004 @@ -22,7 +22,7 @@ * Net_SMTP:: class. * @access public * @package Mail - * @version $Revision: 1.17 $ + * @version $Revision: 1.18 $ */ class Mail_smtp extends Mail { @@ -192,10 +192,14 @@ } $recipients = $this->parseRecipients($recipients); - foreach($recipients as $recipient) { + if (PEAR::isError($recipients)) { + return $recipients; + } + + foreach ($recipients as $recipient) { if (PEAR::isError($res = $smtp->rcptTo($recipient))) { return PEAR::raiseError('unable to add recipient [' . - $recipient . ']: ' . $res->getMessage()); + $recipient . ']: ' . $res->getMessage()); } }

« previous php.pear.cvs (#23740) next »