From 6c35b82256c5c04a1e8a7abbab083de5f16fd0d3 Mon Sep 17 00:00:00 2001 From: Rvanlaak Date: Thu, 10 Apr 2014 16:54:05 +0200 Subject: [PATCH] Check 'context' before 'extra' First check 'context' array, before 'extra' array is checked --- src/Monolog/Handler/PushoverHandler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Monolog/Handler/PushoverHandler.php b/src/Monolog/Handler/PushoverHandler.php index 0b20f2d4..2a4fba41 100644 --- a/src/Monolog/Handler/PushoverHandler.php +++ b/src/Monolog/Handler/PushoverHandler.php @@ -101,7 +101,9 @@ class PushoverHandler extends SocketHandler $dataArray['priority'] = 1; } - if (isset($record['extra']['sound']) && in_array($record['extra']['sound'], $this->sounds)) { + if (isset($record['context']['sound']) && in_array($record['context']['sound'], $this->sounds)) { + $dataArray['sound'] = $record['context']['sound']; + } elseif (isset($record['extra']['sound']) && in_array($record['extra']['sound'], $this->sounds)) { $dataArray['sound'] = $record['extra']['sound']; }