From 10c89612ae01ad05950c4e78e4269e3b62043363 Mon Sep 17 00:00:00 2001 From: Mark Armendariz Date: Sat, 28 Oct 2017 02:35:24 -0500 Subject: [PATCH] do not try to expand the context into a path unless there is context to expand --- src/Log.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Log.php b/src/Log.php index c02fd16..17c78b1 100644 --- a/src/Log.php +++ b/src/Log.php @@ -131,7 +131,9 @@ private static function prepareContext($sMessage, array $aContext = []) { } } - self::assignArrayByPath($aLog, $sMessage, $aContext); + if (count($aContext)) { + self::assignArrayByPath($aLog, $sMessage, $aContext); + } } return $aLog;