Ignore:
Timestamp:
Jun 8, 2018 3:41:16 AM (6 years ago)
Author:
anonymous
Message:

Disable App::sslOn(). Better logging on Email::send() unreplaced variables. Fix the elusive 'Database table session_tbl has invalid columns' error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Email.inc.php

    r628 r630  
    7878    );
    7979
     80    // String that contains filename of the template used (for logging).
     81    protected $_template_filename;
     82
    8083    // String that contains the email body.
    8184    protected $_template;
     
    198201        // This could be a new template, so reset the _template_replaced.
    199202        $this->_template_replaced = null;
     203
     204        $this->_template_filename = $template;
     205
    200206        return true;
    201207    }
     
    221227            // This could be a new template, so reset the _template_replaced.
    222228            $this->_template_replaced = null;
     229
     230            $this->_template_filename = '(using Email::setString)';
     231
    223232            return true;
    224233        }
     
    281290        if (preg_match('/({[^}]+})/', $final_body, $unreplaced_match)) {
    282291            unset($unreplaced_match[0]);
    283             $app->logMsg(sprintf('Cannot get email body. Unreplaced variables in template: %s', getDump($unreplaced_match)), LOG_ERR, __FILE__, __LINE__);
     292            $app->logMsg(sprintf('Cannot get email body. Unreplaced variable %s in template %s', getDump($unreplaced_match)), LOG_ERR, __FILE__, __LINE__);
    284293            return false;
    285294        }
     
    339348        if (preg_match('/({[^}]+})/', $final_body, $unreplaced_match)) {
    340349            unset($unreplaced_match[0]);
    341             $app->logMsg(sprintf('Cannot send email. Unreplaced variables in template: %s', getDump($unreplaced_match)), LOG_ERR, __FILE__, __LINE__);
    342             return false;
     350            $app->logMsg(sprintf('Unreplaced variable "%s" in template "%s"', getDump($unreplaced_match), $this->_template_filename), LOG_ERR, __FILE__, __LINE__);
    343351        }
    344352
Note: See TracChangeset for help on using the changeset viewer.