Bug in tamper condition which got fixed in tamper action

Created on 6 June 2023, about 1 year ago

Problem/Motivation

\Drupal\eca_tamper\Plugin\Action\Tamper::execute and \Drupal\eca_tamper\Plugin\ECA\Condition\Tamper::getLeftValue are almost identical. We fixed a bug in the action plugin but not in the condition plugin:

Error: Cannot use object of type Drupal\tamper\Plugin\Tamper\StrLen as array in Drupal\eca_tamper\Plugin\ECA\Condition\Tamper->getLeftValue() (line 58 of modules/contrib/eca_tamper/src/Plugin/ECA/Condition/Tamper.php).

Drupal\eca_tamper\Plugin\ECA\Condition\Tamper->getLeftValue() (Line: 85)
Drupal\eca\Plugin\ECA\Condition\StringComparisonBase->evaluate() (Line: 194)
Drupal\eca\Service\Conditions->assertCondition() (Line: 650)
Drupal\eca\Entity\Eca->getSuccessors() (Line: 180)
Drupal\eca\Processor->executeSuccessors() (Line: 146)
Drupal\eca\Processor->execute() (Line: 76)
Drupal\eca\EventSubscriber\EcaBase->onEvent()
call_user_func() (Line: 110)

Let's fix that by moving that code block into the trait, so that we don't forget again next time.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024