mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Check that value is a string before treating it as one
This commit is contained in:
parent
df2869c07f
commit
11ccd9c057
@ -129,10 +129,13 @@ function et2_checkType(_val, _type, _attr)
|
||||
return _val;
|
||||
}
|
||||
|
||||
var lcv = _val.toLowerCase();
|
||||
if (lcv === "true" || lcv === "false" || lcv === "")
|
||||
if (typeof _val == "string")
|
||||
{
|
||||
return _val === "true";
|
||||
var lcv = _val.toLowerCase();
|
||||
if (lcv === "true" || lcv === "false" || lcv === "")
|
||||
{
|
||||
return _val === "true";
|
||||
}
|
||||
}
|
||||
|
||||
return _err();
|
||||
|
Loading…
Reference in New Issue
Block a user