From 98b720ef9b9435610f7aff3f503dd3039c48b446 Mon Sep 17 00:00:00 2001 From: Young Padawan Date: Mon, 4 Sep 2017 18:06:01 +0100 Subject: [PATCH] Update Email.php --- src/Mailer/Email.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Mailer/Email.php b/src/Mailer/Email.php index 8efc4b8f13c..194f785ee56 100644 --- a/src/Mailer/Email.php +++ b/src/Mailer/Email.php @@ -2060,7 +2060,7 @@ public function send($content = null) return $contents; } - + /** * Log the email message delivery. @@ -2085,19 +2085,19 @@ protected function _logDelivery($contents) } Log::write( $config['level'], - PHP_EOL . $this->_isKeyArray($contents['headers']) . PHP_EOL . PHP_EOL . $this->_isKeyArray($contents['message']), + PHP_EOL . $this->flatten($contents['headers']) . PHP_EOL . PHP_EOL . $this->flatten($contents['message']), $config['scope'] ); } - - + /** + * Converts an array to string * @param null $key - * @return null|string + * @return string */ - private function _isKeyArray($key = null) + protected function flatten($key = null) { - return is_array($key) ? implode(';', $key) : $key; + return is_array($key) ? implode(';', $key) : (string) $key; } /**