Bug in tamper condition which got fixed in tamper action
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3365071. -->
Reported by: [jurgenhaas](https://www.drupal.org/user/168924)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p><code>\Drupal\eca_tamper\Plugin\Action\Tamper::execute</code> and <code>\Drupal\eca_tamper\Plugin\ECA\Condition\Tamper::getLeftValue</code> are almost identical. We fixed a bug in the action plugin but not in the condition plugin:</p>
<pre>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).<br><br>Drupal\eca_tamper\Plugin\ECA\Condition\Tamper->getLeftValue() (Line: 85)<br>Drupal\eca\Plugin\ECA\Condition\StringComparisonBase->evaluate() (Line: 194)<br>Drupal\eca\Service\Conditions->assertCondition() (Line: 650)<br>Drupal\eca\Entity\Eca->getSuccessors() (Line: 180)<br>Drupal\eca\Processor->executeSuccessors() (Line: 146)<br>Drupal\eca\Processor->execute() (Line: 76)<br>Drupal\eca\EventSubscriber\EcaBase->onEvent()<br>call_user_func() (Line: 110)</pre><p>Let's fix that by moving that code block into the trait, so that we don't forget again next time.</p>
issue