From: Chuck Hagenbuch Date: Wed, 24 Nov 2010 04:47:21 +0000 (-0500) Subject: Catch and log exceptions in __toString() rather than causing a fatal error X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=628873a701f1937a98190db5ed7183c4fa4e9322;p=horde.git Catch and log exceptions in __toString() rather than causing a fatal error --- diff --git a/framework/Core/lib/Horde/Themes/Element.php b/framework/Core/lib/Horde/Themes/Element.php index 3f0d78782..b5444cf16 100644 --- a/framework/Core/lib/Horde/Themes/Element.php +++ b/framework/Core/lib/Horde/Themes/Element.php @@ -90,7 +90,12 @@ class Horde_Themes_Element */ public function __toString() { - return (string)$this->uri; + try { + return (string)$this->uri; + } catch (Exception $e) { + Horde::logMessage($e, 'ERR'); + return ''; + } } /**