Other Plugins

User teamroles - 0 Call to a member function get() on array

  • Justin
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
6 years 1 month ago - 6 years 1 month ago #1 by Justin
Code:
Hi Antonio

I know this is not really your problem since you never developed this plugin, but I am getting know response from the individuals who did develop it.
If I switch my site over from PHP 5.6 to 7.2 I get the following error when a user moves over from one group to another.
"0 Call to a member function get() on array"
github.com/SFWLtd/plg_user_teamroles/issues/

Could you please give me some advice on how to solve this, currently this is the only thing preventing me from moving to php 7.2

Thanks
Last edit: 6 years 1 month ago by Justin.

Please Log in or Create an account to join the conversation.

More
6 years 1 month ago - 6 years 1 month ago #2 by Antonio Durán
Hi Justin.

I've looked into it, and I think I have a fix, although you should test properly to make sure it works as expected.
Change is simple:
File: TeamRolesUserInfo.php
Function :__construct
After:
Code:
$this->username = $username;
Add:
Code:
if (!$params) return;

This is because is TeamRolesUpdater.php, there is this code and comment:
Code:
$teamLeaderInfo = new TeamRolesUserInfo([], $user, $username); //config params arg not needed in this context.
Last edit: 6 years 1 month ago by Antonio Durán.

Please Log in or Create an account to join the conversation.