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

fix: prevent fatal error when refreshing licenses #4176

Closed
1 task done
ravinderk opened this issue Jul 13, 2019 · 2 comments · Fixed by #4177
Closed
1 task done

fix: prevent fatal error when refreshing licenses #4176

ravinderk opened this issue Jul 13, 2019 · 2 comments · Fixed by #4177
Assignees
Milestone

Comments

@ravinderk
Copy link
Collaborator

ravinderk commented Jul 13, 2019

Bug Report

User Story

As an admin, I want to update the license without any issue.

Current Behavior

Admin will get a fatal error if he is on WP <= 4.9.10

PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /wp-includes/class-wp-list-util.php:150
Stack trace:
#0 /wp-includes/functions.php(3697): WP_List_Util->pluck('check_license', NULL)
#1 /wp-content/plugins/give/includes/misc-functions.php(2410): wp_list_pluck(Object(stdClass), 'check_license')

related ticket:
https://secure.helpscout.net/conversation/902058350/43406/
https://secure.helpscout.net/conversation/902220799/43422?folderId=672194
https://secure.helpscout.net/conversation/902155992/43413?folderId=672194

Steps to Reproduce

  1. Install WP 4.9.10
  2. Add add-on license (maybe you will also get a fatal error when adding license)
  3. Open license setting page

Acceptance Criteria

  • I am not getting PHP fatal error when refresh license on WP <=4.9.10 or WP>4.9.10.
@ravinderk ravinderk self-assigned this Jul 13, 2019
@ravinderk ravinderk added this to the July 2019 milestone Jul 13, 2019
ravinderk added a commit that referenced this issue Jul 15, 2019
fix: prevent fatal error when refresh licenses #4176
@DevinWalker DevinWalker changed the title fix: prevent fatal error when refresh licenses fix: prevent fatal error when refreshing licenses Jul 16, 2019
@mathetos
Copy link
Member

I'm not sure but this ticket seems to suggest this error also happens on WP version 5.0.2
https://secure.helpscout.net/conversation/904914308/43578/

@DevinWalker
Copy link
Member

@mathetos yes it occurs on that version as well. I've confirmed this resolves the underlying issue though.

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

Successfully merging a pull request may close this issue.

3 participants