[ZBX-5884] Errors in tr_testexp popup Created: 2012 Nov 22 Updated: 2017 May 30 Resolved: 2012 Dec 02 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.1.0 |
Fix Version/s: | 1.8.16rc1, 2.0.5rc1, 2.1.0 |
Type: | Incident report | Priority: | Trivial |
Reporter: | Oleg Egorov (Inactive) | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | triggertesting | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: | bug.JPG | ||||||||
Issue Links: |
|
Description |
Expression: (({H1:0000.last(0)}=0&{H1:asasa.last(0)}=0&{H1:xml.last(0)}=0)|({H1:0000.last(0)}=1&{H1:asasa.last(0)}=1&{H1:xml.last(0)}=1)|({H1:0000.last(0)}=2&{H1:asasa.last(0)}=2&{H1:xml.last(0)}=2))&(({H1:0000.last(0)}=5&{H1:asasa.last(0)}=5&{H1:xml.last(0)}=5)|({H1:0000.last(0)}=4&{H1:asasa.last(0)}=4&{H1:xml.last(0)}=4)|({H1:0000.last(0)}=3&{H1:asasa.last(0)}=3&{H1:xml.last(0)}=3)) | {TRIGGER.VALUE}=0 Expression constructor -> Test We can enter any value, for example: {H1:0000.last(0)} = 0 {H1:asasa.last(0)} = 0 {H1:xml.last(0)} = 0 {TRIGGER.VALUE} = 0 Result: Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\2.1\frontends\php\include\triggers.inc.php(2419) : eval()'d code on line 1 Parse error: syntax error, unexpected ')' in C:\xampp\htdocs\2.1\frontends\php\include\triggers.inc.php(2419) : eval()'d code on line 1 ... |
Comments |
Comment by Oleg Egorov (Inactive) [ 2012 Nov 27 ] |
And incorrect trigger express test result |
Comment by Alexander Vladishev [ 2012 Dec 02 ] |
Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-5884 |
Comment by Toms (Inactive) [ 2012 Dec 03 ] |
(1) Warning: Deprecated: Call-time pass-by-reference has been deprecated in C:\zabbix\ everywhere in frontend My PHP version: 5.3.13 sasha RESOLVED in r31832 tomtom CLOSED |
Comment by Toms (Inactive) [ 2012 Dec 03 ] |
(2) CTriggerGeneral.php
sasha RESLOVED in r31876 tomtom CLOSED |
Comment by Toms (Inactive) [ 2012 Dec 03 ] |
(3) triggers.inc.php line: 988 ... expressions could be iterated in reverse order, so there would be no need for $offset and $length_new variables sasha RESOLVED in r31877 (fixed camelCase and duplicated code) tomtom CLOSED |
Comment by Toms (Inactive) [ 2012 Dec 03 ] |
(4) getExpressionTree() function should not use referenced parameter but should return value instead. sasha RESOLVED in r31878 tomtom CLOSED |
Comment by Toms (Inactive) [ 2012 Dec 04 ] |
(5) analyze_expression() should be in camelCase as well:
sasha RESOLVED in r31886, r31891 tomtom CLOSED |
Comment by Toms (Inactive) [ 2012 Dec 04 ] |
(6) buildExpressionHtmlTree() missing PHPDoc comment sasha RESOLVED in r31887 tomtom CLOSED |
Comment by Toms (Inactive) [ 2012 Dec 04 ] |
(7) Following expression in expression constructor is treated as single expression: (( {b2:agent.ping.last(0)}=0& {b:agent.ping.last(0)}=0)& {b:agent.ping.last(0)}=0) + 1 sasha CLOSED it is impossible to expand the expression. |
Comment by Toms (Inactive) [ 2012 Dec 04 ] |
(8) Division by zero possible when testing expressions |
Comment by Toms (Inactive) [ 2012 Dec 04 ] |
(9) duplicate code in makeExpression(): if ($operand !== null && $key != $last_key) { $expression .= ' '.$operand.' '; } sasha RESOLVED in r31883 tomtom CLOSED |
Comment by Toms (Inactive) [ 2012 Dec 04 ] |
(10) =0 sasha RESOLVED in r31890 tomtom CLOSED |
Comment by Toms (Inactive) [ 2012 Dec 05 ] |
TESTED |
Comment by Toms (Inactive) [ 2012 Dec 06 ] |
(11) ZBX - 5884 - 18 fix Incorrect trigger function "lasta" provided in expression. Unknown function. before was: Incorrect trigger function "lasta(#2,2)" provided in expression. Unknown function. =23". sasha RESOLVED in r31945. jelisejev CLOSED. |
Comment by Toms (Inactive) [ 2012 Dec 06 ] |
(12) typo in class.ctrigger.php line: $expressionData = new CTriggerExpression($object['expression']); sasha RESOLVED in r31943. jelisejev CLOSED. |
Comment by Alexander Vladishev [ 2012 Dec 07 ] |
Fixed in version pre-1.8.16 r31955, pre-2.0.5 r31993 and pre-2.1.0 (trunk) r31994 |