summaryrefslogtreecommitdiffstats
path: root/frontends/php/bulkloader.php
diff options
context:
space:
mode:
Diffstat (limited to 'frontends/php/bulkloader.php')
-rw-r--r--frontends/php/bulkloader.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontends/php/bulkloader.php b/frontends/php/bulkloader.php
index 9ad52d78..07bd1be3 100644
--- a/frontends/php/bulkloader.php
+++ b/frontends/php/bulkloader.php
@@ -88,9 +88,9 @@
// Determine which template, if any this host is linked to
$sqlResult=DBselect("select distinct(hostid) from hosts where status=". HOST_STATUS_TEMPLATE .
" and host=".zbx_dbstr($tmpHostTemplate));
- if(DBnum_rows($sqlResult)==1)
+ $row=DBfetch($sqlResult);
+ if($row)
{
- $row=DBfetch($sqlResult);
$hostTemplate=$row["hostid"];
}
else