Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Fix access to array key with array #280

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

helmutstrasser
Copy link
Contributor

Within the foreach loop, $sysLanguageUid is not only the language uid, but an array, where the language uid is the key of the array. This fix separates the array from the key, so that $sysLanguageUid is only the key (and therefore the integer language uid).

Resolves: #279

Within the foreach loop, $sysLanguageUid is not only the language uid,
but an array, where the language uid is the key of the array.
This fix separates the array from the key, so that $sysLanguageUid is
only the key (and therefore the integer language uid).

Resolves: fnagel#279
@helmutstrasser
Copy link
Contributor Author

@fnagel
Copy link
Owner

fnagel commented Aug 1, 2024

I think in this case it makes sense. Maybe we can just suppress it here? https://phpmd.org/documentation/suppress-warnings.html

Using @SuppressWarnings(PHPMD.UnusedLocalVariable) should do the trick.

@fnagel
Copy link
Owner

fnagel commented Aug 1, 2024

I have no idea why this checks are waiting for a PHP 7.3 run. Maybe I close and reopen the PR?

@fnagel
Copy link
Owner

fnagel commented Aug 1, 2024

Close and reopen in order to start the checks again...

@fnagel fnagel closed this Aug 1, 2024
@fnagel fnagel reopened this Aug 1, 2024
@fnagel
Copy link
Owner

fnagel commented Aug 1, 2024

I don't get it. The PHP 7.3 check isn't even listed: https://github.com/fnagel/t3extblog/pull/280/checks

@fnagel
Copy link
Owner

fnagel commented Aug 1, 2024

After testing this locally, I will force merge it!

@helmutstrasser
Copy link
Contributor Author

Thanks, Felix! Forcing is always an option :)

Copy link
Owner

@fnagel fnagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 by reading and testing

@fnagel fnagel merged commit f48c1e1 into fnagel:master Sep 18, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot access offset of type array in isset or empty in backend module -> Posts
2 participants