Skip to content

Commit

Permalink
MDL-24896 no more returning explicit reference by get_mailer
Browse files Browse the repository at this point in the history
PHP5 passes and returns reference to objects automatically, no need for
reference operator any more.
  • Loading branch information
mudrd8mz committed Nov 3, 2010
1 parent e83b7a2 commit d21616e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/moodlelib.php
Expand Up @@ -4587,9 +4587,9 @@ function moodle_process_email($modargs,$body) {
*
* @global object
* @param string $action 'get', 'buffer', 'close' or 'flush'
* @return object|null reference to mailer instance if 'get' used or nothing
* @return object|null mailer instance if 'get' used or nothing
*/
function &get_mailer($action='get') {
function get_mailer($action='get') {
global $CFG;

static $mailer = null;
Expand Down Expand Up @@ -4676,7 +4676,7 @@ function &get_mailer($action='get') {
if ($action == 'buffer') {
if (!empty($CFG->smtpmaxbulk)) {
get_mailer('flush');
$m =& get_mailer();
$m = get_mailer();
if ($m->Mailer == 'smtp') {
$m->SMTPKeepAlive = true;
}
Expand Down Expand Up @@ -4791,7 +4791,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml='', $a
$callback,
$messagehtml);
}
$mail =& get_mailer();
$mail = get_mailer();

if (!empty($mail->SMTPDebug)) {
echo '<pre>' . "\n";
Expand Down

0 comments on commit d21616e

Please sign in to comment.