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

foreach() error in administrator/com_migratetojoomla/tmpl/check/default.php on line 51 #18

Open
obuisard opened this issue Nov 9, 2024 · 2 comments

Comments

@obuisard
Copy link
Contributor

obuisard commented Nov 9, 2024

foreach() argument must be of type array|object, null given.

(reported by a tester, I do not have more information, sorry).

image

@obuisard
Copy link
Contributor Author

The error could be avoided by replacing:
$parameterformdata = @$data["frameworkparams"];
with
$parameterformdata = isset($data["frameworkparams"]) ? $data["frameworkparams"] : [];

@HLeithner
Copy link
Member

if it really could be empty ok, but Null coalescing operator should be used with care.
if you use it use this one
$parameterformdata = $data["frameworkparams"] ?? [];

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

No branches or pull requests

2 participants