From 4ca55a90ee2f8e1d8595b0ec53a601d6c65475f6 Mon Sep 17 00:00:00 2001 From: Andy Staudacher Date: Tue, 16 Feb 2010 23:54:39 -0800 Subject: Fix for ticket #1017: Handle the common case of t(html::clean($var)) by casting SafeString instances to string in translate(). --- modules/gallery/libraries/Gallery_I18n.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'modules') diff --git a/modules/gallery/libraries/Gallery_I18n.php b/modules/gallery/libraries/Gallery_I18n.php index cfed046a..160543c9 100644 --- a/modules/gallery/libraries/Gallery_I18n.php +++ b/modules/gallery/libraries/Gallery_I18n.php @@ -117,6 +117,9 @@ class Gallery_I18n_Core { $count = isset($options['count']) ? $options['count'] : null; $values = $options; unset($values['locale']); + if ($message instanceof SafeString) { + $message = (string) $message; + } $this->log($message, $options); $entry = $this->lookup($locale, $message); -- cgit v1.2.3