summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/validate.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-19 14:47:21 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-04-19 14:47:21 +0000
commit979fcceb99e555800fdfbc2cecf4ba585e780b73 (patch)
tree1c00b2ade37f4fa1ef285c070ddfe3e0d4a70247 /frontends/php/include/validate.inc.php
parentd4f46d541400d6a6a55924d27c9c43430aade509 (diff)
downloadzabbix-979fcceb99e555800fdfbc2cecf4ba585e780b73.tar.gz
zabbix-979fcceb99e555800fdfbc2cecf4ba585e780b73.tar.xz
zabbix-979fcceb99e555800fdfbc2cecf4ba585e780b73.zip
- code optimization (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2744 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/validate.inc.php')
-rw-r--r--frontends/php/include/validate.inc.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/frontends/php/include/validate.inc.php b/frontends/php/include/validate.inc.php
index 0e8ba889..4517c221 100644
--- a/frontends/php/include/validate.inc.php
+++ b/frontends/php/include/validate.inc.php
@@ -67,9 +67,7 @@
$expression = str_replace('{'.$f.'}','$_REQUEST["'.$f.'"]',$expression);
//$debug .= $f." = ".$_REQUEST[$f].BR;
}
- $expression=rtrim($expression,"&");
- if($expression[strlen($expression)-1]=='&') $expression[strlen($expression)-1]=0;
- if($expression[strlen($expression)-1]=='&') $expression[strlen($expression)-1]=0;
+ $expression = trim($expression,"& ");
$exec = "return (".$expression.") ? 1 : 0;";
$ret = eval($exec);
@@ -269,7 +267,7 @@
{
if($flags&P_SYS)
{
- info("Critical error. Incorrect value for [".$field."]");
+ info("Critical error. Incorrect value for [".$field."] = '".$_REQUEST[$field]."'");
return ZBX_VALID_ERROR;
}
else