On a fresh install from SVN 5784, I'm unable to copy items from a built-in template to an empty template. I traced it down to items.php line 469 where $result was being assigned by-reference to the return value from copy_item_to_host(). Removing the ampersand seems to fix the problem, but I'm not sure if that was being done for a reason, as this is my first look at the code.
I'm running php-5.2.6, in case it makes a difference.
Code:
--- zabbix-1.5.4.5784-orig/frontends/php/items.php 2008-06-20 04:23:38.000000000 -0700
+++ zabbix-1.5.4.5784/frontends/php/items.php 2008-06-23 15:39:24.000000000 -0700
@@ -466,7 +466,7 @@
DBstart();
foreach($_REQUEST["group_itemid"] as $item_id)
foreach($hosts_ids as $host_id){
- $result &= copy_item_to_host($item_id, $host_id, true);
+ $result = copy_item_to_host($item_id, $host_id, true);
}
$result = DBend($result);
@@ -971,4 +971,4 @@
include_once "include/page_footer.php"
-?>
\ No newline at end of file
+?>
Comment