Skip to content

Instantly share code, notes, and snippets.

@BlueSkyDetector
Created October 17, 2013 03:30
Show Gist options
  • Save BlueSkyDetector/7018855 to your computer and use it in GitHub Desktop.
Save BlueSkyDetector/7018855 to your computer and use it in GitHub Desktop.
ZBX-7091_fix_profile_for_1.8.x.patch
Index: frontends/php/include/profiles.inc.php
===================================================================
--- frontends/php/include/profiles.inc.php (revision 39357)
+++ frontends/php/include/profiles.inc.php (working copy)
@@ -133,7 +133,7 @@
'profileid' => get_dbid('profiles', 'profileid'),
'userid' => $USER_DETAILS['userid'],
'idx' => zbx_dbstr($idx),
- $value_type => ($value_type == 'value_str') ? zbx_dbstr($value) : $value,
+ $value_type => zbx_dbstr($value),
'type' => zbx_dbstr($type),
'idx2' => zbx_dbstr($idx2)
);
@@ -153,7 +153,6 @@
if($idx2 > 0) $sql_cond.= ' AND idx2='.$idx2.' AND '.DBin_node('idx2', false);
$value_type = self::getFieldByType($type);
- $value = ($value_type == 'value_str') ? zbx_dbstr($value) : $value;
$sql = 'UPDATE profiles SET '.
$value_type.'='.zbx_dbstr($value).','.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment