dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
99246b6
)
(bug 23648) PHP yells about using objects in implode(). Would be nice if __toString...
author
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 25 May 2010 13:25:37 +0000
(13:25 +0000)
committer
Chad Horohoe
<demon@users.mediawiki.org>
Tue, 25 May 2010 13:25:37 +0000
(13:25 +0000)
includes/UserMailer.php
patch
|
blob
|
history
diff --git
a/includes/UserMailer.php
b/includes/UserMailer.php
index
99f99d2
..
15d5f77
100644
(file)
--- a/
includes/UserMailer.php
+++ b/
includes/UserMailer.php
@@
-99,7
+99,7
@@
class UserMailer {
* array of parameters. It requires PEAR:Mail to do that.
* Otherwise it just uses the standard PHP 'mail' function.
*
* array of parameters. It requires PEAR:Mail to do that.
* Otherwise it just uses the standard PHP 'mail' function.
*
- * @param $to MailAddress: recipient's email
+ * @param $to MailAddress: recipient's email
(or an array of them)
* @param $from MailAddress: sender's email
* @param $subject String: email's subject.
* @param $body String: email's text.
* @param $from MailAddress: sender's email
* @param $subject String: email's subject.
* @param $body String: email's text.
@@
-112,6
+112,12
@@
class UserMailer {
global $wgEnotifMaxRecips;
if ( is_array( $to ) ) {
global $wgEnotifMaxRecips;
if ( is_array( $to ) ) {
+ // This wouldn't be necessary if implode() worked on arrays of
+ // objects using __toString(). http://bugs.php.net/bug.php?id=36612
+ foreach( $to as $t ) {
+ $emails .= $t->toString() . ",";
+ }
+ $emails = rtrim( $emails, ',' );
wfDebug( __METHOD__.': sending mail to ' . implode( ',', $to ) . "\n" );
} else {
wfDebug( __METHOD__.': sending mail to ' . implode( ',', array( $to->toString() ) ) . "\n" );
wfDebug( __METHOD__.': sending mail to ' . implode( ',', $to ) . "\n" );
} else {
wfDebug( __METHOD__.': sending mail to ' . implode( ',', array( $to->toString() ) ) . "\n" );