From 01bb026750f78953b29df199437c014b87f32f42 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 22 Jan 2013 15:56:28 +0100 Subject: [PATCH] Add BC for the sendHeaders property, fixes #152 --- src/Monolog/Handler/ChromePHPHandler.php | 15 +++++++++++++++ src/Monolog/Handler/FirePHPHandler.php | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/Monolog/Handler/ChromePHPHandler.php b/src/Monolog/Handler/ChromePHPHandler.php index 5f6bc6a8..fd832a76 100644 --- a/src/Monolog/Handler/ChromePHPHandler.php +++ b/src/Monolog/Handler/ChromePHPHandler.php @@ -40,6 +40,21 @@ class ChromePHPHandler extends AbstractProcessingHandler protected static $sendHeaders = true; + /** + * pointer to the static sendHeaders for BC + */ + protected $sendHeaders; + + /** + * @param integer $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + $this->sendHeaders =& static::$sendHeaders; + } + /** * {@inheritdoc} */ diff --git a/src/Monolog/Handler/FirePHPHandler.php b/src/Monolog/Handler/FirePHPHandler.php index a624c75e..b9f904dd 100644 --- a/src/Monolog/Handler/FirePHPHandler.php +++ b/src/Monolog/Handler/FirePHPHandler.php @@ -53,6 +53,21 @@ class FirePHPHandler extends AbstractProcessingHandler protected static $sendHeaders = true; + /** + * pointer to the static sendHeaders for BC + */ + protected $sendHeaders; + + /** + * @param integer $level The minimum logging level at which this handler will be triggered + * @param Boolean $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + $this->sendHeaders =& static::$sendHeaders; + } + /** * Base header creation function used by init headers & record headers *