Minor tweak to prevent an E_STRICT warning:
authorNick Jenkins <nickj@users.mediawiki.org>
Thu, 11 Oct 2007 07:04:59 +0000 (07:04 +0000)
committerNick Jenkins <nickj@users.mediawiki.org>
Thu, 11 Oct 2007 07:04:59 +0000 (07:04 +0000)
"Object of class MailAddress to string conversion in includes/UserMailer.php on line 112"
(It seems a bit silly of PHP to give this warning when the class has a __toString method,
 but adding an explicit toString() call is easy enough)

includes/UserMailer.php

index cd15e3a..19a4728 100644 (file)
@@ -109,7 +109,7 @@ class UserMailer {
                if ( is_array( $to ) ) {
                        wfDebug( __METHOD__.': sending mail to ' . implode( ',', $to ) . "\n" );
                } else {
-                       wfDebug( __METHOD__.': sending mail to ' . implode( ',', array( $to ) ) . "\n" );
+                       wfDebug( __METHOD__.': sending mail to ' . implode( ',', array( $to->toString() ) ) . "\n" );
                }
 
                if (is_array( $wgSMTP )) {