From 76644166e8a4264d2903055daabc4317f7f1fc1b Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 14 Feb 2013 15:56:19 +0000 Subject: [PATCH] Only warn about attribute type mismatch if there is a value --- etemplate/js/et2_core_common.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/etemplate/js/et2_core_common.js b/etemplate/js/et2_core_common.js index 6bb85d7a1a..936b37d3df 100644 --- a/etemplate/js/et2_core_common.js +++ b/etemplate/js/et2_core_common.js @@ -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; }