Skip to content

Commit 98b720e

Browse files
authored
Update Email.php
1 parent aa5a012 commit 98b720e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Mailer/Email.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,7 +2060,7 @@ public function send($content = null)
20602060

20612061
return $contents;
20622062
}
2063-
2063+
20642064

20652065
/**
20662066
* Log the email message delivery.
@@ -2085,19 +2085,19 @@ protected function _logDelivery($contents)
20852085
}
20862086
Log::write(
20872087
$config['level'],
2088-
PHP_EOL . $this->_isKeyArray($contents['headers']) . PHP_EOL . PHP_EOL . $this->_isKeyArray($contents['message']),
2088+
PHP_EOL . $this->flatten($contents['headers']) . PHP_EOL . PHP_EOL . $this->flatten($contents['message']),
20892089
$config['scope']
20902090
);
20912091
}
2092-
2093-
2092+
20942093
/**
2094+
* Converts an array to string
20952095
* @param null $key
2096-
* @return null|string
2096+
* @return string
20972097
*/
2098-
private function _isKeyArray($key = null)
2098+
protected function flatten($key = null)
20992099
{
2100-
return is_array($key) ? implode(';', $key) : $key;
2100+
return is_array($key) ? implode(';', $key) : (string) $key;
21012101
}
21022102

21032103
/**

0 commit comments

Comments
 (0)