Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save andrioli/a872856a1669cb0e226e to your computer and use it in GitHub Desktop.
Save andrioli/a872856a1669cb0e226e to your computer and use it in GitHub Desktop.
Path for Monolog/HipChat
From 201bce80220c8bccd2bed5bd0db56c42897c2cea Mon Sep 17 00:00:00 2001
From: Roberto Araujo <[email protected]>
Date: Wed, 3 Jun 2015 22:21:16 -0300
Subject: [PATCH] Using the correct value for parameter 'notify'
---
src/Monolog/Handler/HipChatHandler.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/Monolog/Handler/HipChatHandler.php b/src/Monolog/Handler/HipChatHandler.php
index 6b0fa98..34d3437 100644
--- a/src/Monolog/Handler/HipChatHandler.php
+++ b/src/Monolog/Handler/HipChatHandler.php
@@ -135,7 +135,9 @@ class HipChatHandler extends SocketHandler
private function buildContent($record)
{
$dataArray = array(
- 'notify' => $this->notify,
+ 'notify' => $this->version == self::API_V1 ?
+ ($this->notify ? 1 : 0) :
+ ($this->notify ? 'true' : 'false'),
'message' => $record['formatted'],
'message_format' => $this->format,
'color' => $this->getAlertColor($record['level']),
--
2.2.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment