Changeset 410 in t29-www for lib/mail


Ignore:
Timestamp:
May 21, 2013, 7:12:37 PM (11 years ago)
Author:
sven
Message:

Bugfix für PHP 5.3 (unter PHP 5.4 entwickelt, kein this
in Closures)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/mail/mailer.php

    r409 r410  
    101101EOT;
    102102
    103                                 if($this->ack) $ret .= <<<EOT1
     103                                if($mailer->ack) $ret .= <<<EOT1
    104104
    105105Der Besucher bekam dafür eine Bestätigungsmail an die Adresse
    106 {$this->ack_to}  .
     106{$mailer->ack_to}  .
    107107
    108108EOT1;
     
    219219                elseif(is_string($this->_values[$property])) {
    220220                        // make string replacements
    221                         return preg_replace_callback("/\{([^}]+)\}/", function($match) {
     221                        $mailer = $this; // PHP 5.3 convenience
     222                        return preg_replace_callback("/\{([^}]+)\}/", function($match) using($mailer) {
    222223                                $identifier = $match[1];
    223                                 return isset($this->_values[$identifier])
    224                                         ? $this->_values[$identifier]
     224                                return isset($mailer->_values[$identifier])
     225                                        ? $mailer->_values[$identifier]
    225226                                        : "{?$identifier?}";
    226227                        }, $this->_values[$property]);
Note: See TracChangeset for help on using the changeset viewer.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License