diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-10-27 19:35:21 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-10-27 19:35:21 -0700 |
commit | 145a3f80ce957267fdd6f6227922847b116f2e72 (patch) | |
tree | 42f50d798d259c44e8ef57a94257cc91432dbde9 /modules/gallery/libraries/Menu.php | |
parent | cb0243bbe85599f1f5b8d710bd4825bcde111c84 (diff) |
Guard against developers who forget to internationalize label strings
Diffstat (limited to 'modules/gallery/libraries/Menu.php')
-rw-r--r-- | modules/gallery/libraries/Menu.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gallery/libraries/Menu.php b/modules/gallery/libraries/Menu.php index fba21e09..20405317 100644 --- a/modules/gallery/libraries/Menu.php +++ b/modules/gallery/libraries/Menu.php @@ -43,6 +43,11 @@ class Menu_Element { * @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; } |