diff options
Diffstat (limited to 'frontends/php/include/hosts.inc.php')
| -rw-r--r-- | frontends/php/include/hosts.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontends/php/include/hosts.inc.php b/frontends/php/include/hosts.inc.php index 4730cdd3..f155d92b 100644 --- a/frontends/php/include/hosts.inc.php +++ b/frontends/php/include/hosts.inc.php @@ -148,7 +148,7 @@ require_once "include/items.inc.php"; global $ZBX_CURNODEID; /* Character '-' must be last in the list of symbols, otherwise it won't be accepted */ - if (!eregi('^([0-9a-zA-Z\_\.\$[.-.]]+)$', $dns)) + if ( !empty($dns) && !eregi('^([0-9a-zA-Z\_\.\$[.-.]]+)$', $dns)) { error("DNS should contain '0-9a-zA-Z_.$'- characters only"); return false; |
