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 Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in class-newspack-popups-data-api.php:120 #1206

Open
yogeshbeniwal opened this issue Aug 22, 2023 · 1 comment
Assignees

Comments

@yogeshbeniwal
Copy link
Contributor

Upgrade to v2.22.0 is resulting into below error

2023/08/22 14:20:53 [error] 13835#13835: *5449 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /newspack-popups/includes/class-newspack-popups-data-api.php:120 Stack trace: #0 /newspack-popups/includes/class-newspack-popups-data-api.php(165): Newspack_Popups_Data_Api::get_popup_metadata() #1 /wp-includes/class-wp-hook.php(310): Newspack_Popups_Data_Api::get_rendered_popups() #2 /wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters() #3 /wp-includes/plugin.php(517): WP_Hook->do_action() #4 /newspack-popups/includes/class-newspack-popups-model.php(1135): do_action() #5 /newspack-popups/includes/class-newspack-popups-inserter.php(532): Newspack_Popups_Model::generate_popup()

@miguelpeixe
Copy link
Member

It looks like this may happen if the reader revenue settings fail to return a valid configuration array. Do you have properly configured donation settings and products with WC?

I'll look into handling this error so it doesn't throw a fatal.

@miguelpeixe miguelpeixe self-assigned this Aug 22, 2023
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