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

PHP error due to trailing commas #195

Closed
1 task done
dkotter opened this issue Jan 31, 2023 · 1 comment · Fixed by #196
Closed
1 task done

PHP error due to trailing commas #195

dkotter opened this issue Jan 31, 2023 · 1 comment · Fixed by #196
Assignees
Labels
type:bug Something isn’t working.
Milestone

Comments

@dkotter
Copy link
Collaborator

dkotter commented Jan 31, 2023

Describe the bug

As reported on WordPress.org, there's a PHP error linked to these lines.

It was hypothesized that this was due to the missing textdomain, though I didn't think that would cause a problem. After further user testing, it seems to be an issue with a trailing comma in those translation functions. In doing some research, this seemed to be something that would cause an issue in PHP 7.2 or less but was fixed in PHP 7.3+. Our PHP minimum is 7.4 so I didn't think this would be an issue but the user report we got is using PHP 8.1, so seems like maybe this doesn't fully work in PHP 7.3+?

I don't think there's any need to have those commas so a quick fix here is to remove those.

Steps to Reproduce

I've not reproduced myself but see the WordPress.org thread for more details.

Screenshots, screen recording, code snippet

No response

Environment information

No response

WordPress information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@dkotter dkotter added the type:bug Something isn’t working. label Jan 31, 2023
@sekra24
Copy link
Contributor

sekra24 commented Jan 31, 2023

Hey @dkotter , just submitted a pull request. Hope that helps ;)

@dkotter dkotter mentioned this issue Jan 31, 2023
4 tasks
@faisal-alvi faisal-alvi added this to the 2.7.4 milestone Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn’t working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants