N°3335 - Notifications on threshold don't work when trigger is created on iTop 2.7.1 - nicer fix

This commit is contained in:
acognet
2020-09-29 10:27:05 +02:00
parent 80b3212a19
commit 05a0d61244
5 changed files with 25 additions and 22 deletions

View File

@@ -839,12 +839,15 @@ class MatchExpression extends BinaryExpression
* MatchExpression constructor.
*
* @param \FieldExpression $oLeftExpr
* @param \ScalarExpression $oRightExpr
* @param \Expression $oRightExpr
*
* @throws \CoreException
*/
public function __construct(FieldExpression $oLeftExpr, ScalarExpression $oRightExpr)
public function __construct(FieldExpression $oLeftExpr, Expression $oRightExpr)
{
if (!$oRightExpr instanceof ScalarExpression && !$oRightExpr instanceof VariableExpression) {
throw new CoreException('Only instance of ScalarExpression or VariableExpression are allowed in MATCHES '.get_class( $oRightExpr).' found', $oRightExpr);
}
parent::__construct($oLeftExpr, 'MATCHES', $oRightExpr);
}