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

Some user gets a fatal error #2371

Closed
rodica-andronache opened this issue Sep 2, 2024 · 3 comments · Fixed by #2372
Closed

Some user gets a fatal error #2371

rodica-andronache opened this issue Sep 2, 2024 · 3 comments · Fixed by #2372
Assignees
Labels
bug This label could be used to identify issues that are caused by a defect in the product. question Can be used to identify issues that are asking a question about the code or how to use the project. released Indicate that an issue has been resolved and released in a particular version of the product.

Comments

@rodica-andronache
Copy link

Description

! I'm not able to replicate this.

The user here reported that he got a fatal error from Otter

PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, null given in /home/customer/www/joyeriaoliva.com/public_html/wp-content/plugins/otter-blocks/inc/class-main.php:185

From here

$list = array_merge( $props, $attr );

And he said that checking if $attr is array, fixes the issue. I'm not sure if this is something needed to do or not, on our side.
It's possible that this can be a plugin conflict on his site, he didn't want to check it with the HealthCheck plugin.

Step-by-step reproduction instructions

I'm not able to replicate this, to provide steps

Screenshots, screen recording, code snippet or Help Scout ticket

https://secure.helpscout.net/conversation/2694468020/432139?viewId=212385

Environment info

No response

Is the issue you are reporting a regression

No

@rodica-andronache rodica-andronache added the bug This label could be used to identify issues that are caused by a defect in the product. label Sep 2, 2024
@pirate-bot pirate-bot added the customer report Indicates the request came from a customer. label Sep 2, 2024
@rodica-andronache rodica-andronache added question Can be used to identify issues that are asking a question about the code or how to use the project. and removed customer report Indicates the request came from a customer. labels Sep 2, 2024
@vytisbulkevicius
Copy link
Contributor

I think we can add a check to ensure that the $attr variable is an array before calling array_merge to prevent this issue even if it's an edge case.

@girishpanchal30
Copy link
Contributor

I've reviewed this issue and fixed it here - #2372

@girishpanchal30 girishpanchal30 linked a pull request Sep 4, 2024 that will close this issue
9 tasks
@pirate-bot
Copy link
Contributor

🎉 This issue has been resolved in version 3.0.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This label could be used to identify issues that are caused by a defect in the product. question Can be used to identify issues that are asking a question about the code or how to use the project. released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants