× Other Plugins

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

1 week 2 days ago 1 week 2 days ago by Justin.
Justin
Posts: 94
More
Topic Author
User teamroles - 0 Call to a member function get() on array #1
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/ k

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
1 week 1 day ago 1 week 1 day ago by Antonio Durán.
Antonio Durán
Posts: 6975
More
User teamroles - 0 Call to a member function get() on array #2
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:
        $this->username = $username;
Add:
        if (!$params)
            return;

This is because is TeamRolesUpdater.php, there is this code and comment:
                $teamLeaderInfo = new TeamRolesUserInfo([], $user, $username);  //config params arg not needed in this context.