Guard against developers who forget to internationalize label strings

This commit is contained in:
Bharat Mediratta
2009-10-27 19:35:21 -07:00
parent cb0243bbe8
commit 145a3f80ce
+5
View File
@@ -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;
}