Skip to content

Commit

Permalink
Drop usage of reset while querying "id" attribute in SimpleXml as "id…
Browse files Browse the repository at this point in the history
…" is just a string no array
  • Loading branch information
magicsunday committed Jun 12, 2024
1 parent 5146d82 commit c30f7a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/TranslationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ public function importAction(bool $update = false): ResponseInterface

/** @var SimpleXMLElement $translation */
foreach ($data->file->body->children() as $translation) {
$key = reset($translation->attributes()['id']);
$key = (string) $translation->attributes()['id'];

$componentName = $this->getComponentFromKey($key);
if ($componentName === null) {
Expand Down

0 comments on commit c30f7a9

Please sign in to comment.