public

ZBX-5348_for_1.8.x.patch

  • Download Gist
ZBX-5348_for_1.8.x.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
--- popup_bitem.php.orig 2012-07-26 21:14:00.000000000 +0900
+++ popup_bitem.php 2012-07-26 21:16:40.000000000 +0900
@@ -60,7 +60,7 @@
$_REQUEST['caption'] = get_request('caption','');
$_REQUEST['axisside'] = get_request('axisside', GRAPH_YAXIS_SIDE_LEFT);
- if(zbx_empty($_REQUEST['caption']) && isset($_REQUEST['itemid']) && ($_REQUEST['itemid'] > 0)){
+ if(zbx_empty($_REQUEST['caption']) && isset($_REQUEST['itemid']) && $_REQUEST['itemid'] && zbx_is_int($_REQUEST['itemid'])){
$_REQUEST['caption'] = item_description(get_item_by_itemid($_REQUEST['itemid']));
}
@@ -108,7 +108,7 @@
$axisside = get_request('axisside', GRAPH_YAXIS_SIDE_LEFT);
$description = '';
- if($itemid > 0){
+ if($itemid > 0 && zbx_is_int($itemid)){
$description = get_item_by_itemid($itemid);
$description = item_description($description);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.