Skip to content

Commit

Permalink
Don't try to set horde specific variables on non-horde exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
ralflang committed Oct 30, 2023
1 parent d0096c9 commit f35462f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Horde/Core/Log/Object.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @license http://www.horde.org/licenses/lgpl21 LGPL-2.1
* @package Core
*/

use Horde\Exception\HordeException;
/**
* A loggable event, with the display controlled by Horde configuration.
*
Expand Down Expand Up @@ -113,7 +113,7 @@ public function __construct($event, $priority = null,
$priority = Horde_Log::ERR;
}

if ($event instanceof Horde_Exception) {
if ($event instanceof HordeException) {
$this->_logged = $event->logged;
if ($loglevel = $event->getLogLevel()) {
$priority = $loglevel;
Expand Down Expand Up @@ -227,7 +227,7 @@ public function __set($name, $value)
{
switch ($name) {
case 'logged':
if ($value && $this->_exception) {
if ($value && $this->_exception instanceof HordeException) {
$this->_exception->logged = true;
}
$this->_logged = $value;
Expand Down

0 comments on commit f35462f

Please sign in to comment.