Skip to content

Instantly share code, notes, and snippets.

@BlueSkyDetector
Created July 26, 2012 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BlueSkyDetector/3181678 to your computer and use it in GitHub Desktop.
Save BlueSkyDetector/3181678 to your computer and use it in GitHub Desktop.
ZBX-5348_for_1.8.x.patch
--- 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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment