diff --git a/rules/TYPO311/v5/FlexFormToolsArrayValueByPathRector.php b/rules/TYPO311/v5/FlexFormToolsArrayValueByPathRector.php index 7185170f5..772924401 100644 --- a/rules/TYPO311/v5/FlexFormToolsArrayValueByPathRector.php +++ b/rules/TYPO311/v5/FlexFormToolsArrayValueByPathRector.php @@ -94,6 +94,10 @@ private function refactorSetValueByPath(Expression $node): ?Node return null; } + if (! $this->isNames($methodCall->name, ['setArrayValueByPath'])) { + return null; + } + $variableName = $this->getName($methodCall->args[1]->value) ?? 'dataArray'; $variable = new Variable($variableName); diff --git a/tests/Rector/v11/v5/FlexFormToolsArrayValueByPathRector/Fixture/fixture.php.inc b/tests/Rector/v11/v5/FlexFormToolsArrayValueByPathRector/Fixture/fixture.php.inc index ddee1c899..e9e5a7eb7 100644 --- a/tests/Rector/v11/v5/FlexFormToolsArrayValueByPathRector/Fixture/fixture.php.inc +++ b/tests/Rector/v11/v5/FlexFormToolsArrayValueByPathRector/Fixture/fixture.php.inc @@ -7,6 +7,8 @@ $searchArray = []; $value = $flexFormTools->getArrayValueByPath('search/path', $searchArray); $flexFormTools->setArrayValueByPath('set/path', $dataArray, $value); + +$flexFormTools->cleanFlexFormXML('tt_content', 'pi_flexform', $row); ?> ----- cleanFlexFormXML('tt_content', 'pi_flexform', $row); ?>