Skip to content

Commit

Permalink
Guard against developers who forget to internationalize label strings
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Oct 28, 2009
1 parent cb0243b commit 145a3f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/gallery/libraries/Menu.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 145a3f8

Please sign in to comment.