From 145a3f80ce957267fdd6f6227922847b116f2e72 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 27 Oct 2009 19:35:21 -0700 Subject: [PATCH] Guard against developers who forget to internationalize label strings --- modules/gallery/libraries/Menu.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index fba21e09a5..20405317d5 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -43,6 +43,11 @@ public function id($id) { * @chainable */ public function label($label) { + // Guard against developers who forget to internationalize label strings + if (!($label instanceof SafeString)) { + $label = new SafeString($label); + } + $this->label = $label; return $this; }