Skip to content
Snippets Groups Projects

Issue #3138522: WARNING | Since PHP 7.0, functions inspecting arguments, like debug_backtrace()

Merged Issue #3138522: WARNING | Since PHP 7.0, functions inspecting arguments, like debug_backtrace()
Merged bzaher requested to merge issue/htmlmail-3138522:3138522-warning--since into 7.x-2.x
1 file
+ 1
10
Compare changes
  • Side-by-side
  • Inline
+ 1
10
@@ -233,7 +233,6 @@ class HTMLMailSystem implements MailSystemInterface {
* - MailMIME: The message, parsed into a MailMIME object.
*/
public function mail(array $raw_message) {
$trace = debug_backtrace(0);
$eol = variable_get('mail_line_endings', MAIL_LINE_ENDINGS);
// Ensure that subject is non-null.
$message = $raw_message + array('subject' => t('(No subject)'));
@@ -316,15 +315,7 @@ class HTMLMailSystem implements MailSystemInterface {
foreach ($params as $i => $value) {
$params[$i] = var_export($value, 1);
}
if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {
$trace = print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), 1);
}
else {
for ($i = count($trace) - 1; $i >= 0; $i--) {
unset($trace[$i]['args']);
}
$trace = print_r($trace);
}
$trace = print_r(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), 1);
watchdog('htmlmail', 'Mail sending failed because:<br /><pre>@call</pre><br />returned FALSE.<br /><pre>@trace</pre>', array('@call' => $call, '@trace' => $trace));
}
return $result;
Loading