Skip to content

Commit

Permalink
If history system is disabled, we should be using a null object - not…
Browse files Browse the repository at this point in the history
… throw an exception

There is code in turba, for example, that will fatally error if history
system is not configured.  This is wrong; the information should simply
be empty.
  • Loading branch information
slusarz committed Mar 7, 2014
1 parent b728546 commit 5a76868
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions framework/Core/lib/Horde/Core/Factory/History.php
Expand Up @@ -61,12 +61,8 @@ public function create(Horde_Injector $injector)
}

if (is_null($history)) {
throw new Horde_Exception(
Horde_Core_Translation::t("The History system is disabled.")
);
}

if ($cache = $injector->getInstance('Horde_Cache')) {
$history = new Horde_History_Null();
} elseif ($cache = $injector->getInstance('Horde_Cache')) {
$history->setCache($cache);
}

Expand Down

0 comments on commit 5a76868

Please sign in to comment.