Changeset 41 for trunk/lib/Email.inc.php
- Timestamp:
- Dec 17, 2005 9:11:26 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Email.inc.php
r40 r41 16 16 )); 17 17 $email->setTemplate('email_registration_confirm.ihtml'); 18 // $email->setString('Or you can pass your message body as a string, also with {VARIABLES}.'); 18 19 $email->replace(array( 19 20 'site_name' => App::getParam('site_name'), … … 153 154 { 154 155 // Load file, using include_path. 155 if ('' == $string) {156 if ('' == trim($string)) { 156 157 App::logMsg(sprintf('Empty string provided.', null), LOG_ERR, __FILE__, __LINE__); 157 158 $this->_template_replaced = null; 158 159 return false; 159 160 } else { 160 $ _template = $string;161 $this->_template = $string; 161 162 // This could be a new template, so reset the _template_replaced. 162 163 $this->_template_replaced = null; … … 244 245 // Ensure all placeholders have been replaced. Find anything with {...} characters. 245 246 if (preg_match('/({[^}]+})/', $final_body, $unreplaced_match)) { 246 App::logMsg(sprintf('Cannot send email. Variables left unreplaced in template: %s', (isset($unreplaced_match ) ? $unreplaced_match[1] : '')), LOG_ERR, __FILE__, __LINE__);247 App::logMsg(sprintf('Cannot send email. Variables left unreplaced in template: %s', (isset($unreplaced_match[1]) ? $unreplaced_match[1] : '')), LOG_ERR, __FILE__, __LINE__); 247 248 return false; 248 249 }
Note: See TracChangeset
for help on using the changeset viewer.