Only warn about attribute type mismatch if there is a value

This commit is contained in:
Nathan Gray 2013-02-14 15:56:19 +00:00
parent 90fa3a8287
commit 76644166e8

View File

@ -95,10 +95,12 @@ function et2_checkType(_val, _type, _attr, _cname)
function _err() {
var res = et2_typeDefaults[_type];
egw.debug("warn", "'" + _val + "' was not of specified _type '" +
_type + (_attr != null ? "' for attribute '" + _attr + "' " : "") +
"and is now '" + res + "'");
if(typeof _val != "undefined" && _val)
{
egw.debug("warn", "'" + _val + "' was not of specified _type '" +
_type + (_attr != null ? "' for attribute '" + _attr + "' " : "") +
"and is now '" + res + "'");
}
return res;
}