Ad Widget

Collapse

Zabbix 1.5.4 - Build 5784 - Item copy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jweisner
    Junior Member
    • Jun 2008
    • 1

    #1

    Zabbix 1.5.4 - Build 5784 - Item copy

    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.

    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
    +?>
    I'm running php-5.2.6, in case it makes a difference.
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    I think this is related to last Palmertree's -> post.

    P.S. For now, there is no correct fix to this.
    Zabbix | ex GUI developer

    Comment

    Working...