Skip to content

Commit

Permalink
Use a stub instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 15, 2017
1 parent d5b93c6 commit 6cc9720
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions framework/Image/lib/Horde/Image/Base.php
Expand Up @@ -124,9 +124,10 @@ protected function __construct($params, $context = array())
);
}
$this->_tmpdir = $context['tmpdir'];
if (!empty($context['logger'])) {
$this->_logger = $context['logger'];
}

$this->_logger = !empty($context['logger'])
? $context['logger']
: new Horde_Support_Stub();

if (isset($params['width'])) {
$this->_width = $params['width'];
Expand Down Expand Up @@ -499,9 +500,7 @@ public function clearGeometry()
*/
protected function _logDebug($message)
{
if (!empty($this->_logger)) {
$this->_logger->debug($message);
}
$this->_logger->debug($message);
}

/**
Expand All @@ -511,9 +510,7 @@ protected function _logDebug($message)
*/
protected function _logErr($message)
{
if (!empty($this->_logger)) {
$this->_logger->err($message);
}
$this->_logger->err($message);
}

/**
Expand Down

0 comments on commit 6cc9720

Please sign in to comment.