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

Mailchimp: PHP notices #250

Closed
dkoo opened this issue Jun 30, 2020 · 2 comments · Fixed by #256
Closed

Mailchimp: PHP notices #250

dkoo opened this issue Jun 30, 2020 · 2 comments · Fixed by #256
Assignees
Labels
bug Something isn't working released

Comments

@dkoo
Copy link
Contributor

dkoo commented Jun 30, 2020

Seeing the following PHP notices on a fresh install of the latest Newspack plugin + Newsletters.

Notice: Accessing static property Newspack_Newsletters_Mailchimp_Controller::$service_provider as non static in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider-controller.php on line 28
Notice: Accessing static property Newspack_Newsletters_Mailchimp::$controller as non static in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider.php on line 42
Notice: Accessing static property Newspack_Newsletters_Mailchimp::$controller as non static in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider.php on line 42
Notice: Accessing static property Newspack_Newsletters_Mailchimp::$controller as non static in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider.php on line 43
Warning: Cannot modify header information - headers already sent by (output started at /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider-controller.php:28) in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-includes/functions.php on line 6221
Warning: Cannot modify header information - headers already sent by (output started at /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider-controller.php:28) in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-admin/includes/misc.php on line 1282
Warning: Cannot modify header information - headers already sent by (output started at /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider-controller.php:28) in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-admin/admin-header.php on line 9
Warning: Cannot modify header information - headers already sent by (output started at /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider-controller.php:28) in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-includes/option.php on line 961
Warning: Cannot modify header information - headers already sent by (output started at /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-content/plugins/newspack-newsletters/includes/service-providers/class-newspack-newsletters-service-provider-controller.php:28) in /srv/users/user2400f8f8/apps/user2400f8f8/public/wp-includes/option.php on line 962
@dkoo dkoo added the bug Something isn't working label Jun 30, 2020
@iuravic iuravic self-assigned this Jul 1, 2020
@jeffersonrabb
Copy link
Contributor

This is reproducible on Jurassic Ninja instances. The warnings will be seen in the browser. Was able to resolve by changing $service_provider and $controller to non-static class properties in https://github.com/Automattic/newspack-newsletters/blob/master/includes/service-providers/class-newspack-newsletters-service-provider-controller.php#L20 and
https://github.com/Automattic/newspack-newsletters/blob/master/includes/service-providers/class-newspack-newsletters-service-provider.php#L22.

@matticbot
Copy link
Contributor

🎉 This issue has been resolved in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants