MySites not connecting
-
I recently encountered an issue with MySites.guru not connecting properly to one of my client websites. Phil Taylor did research, found and fixed the issue. Here is what he stated which I think should be forwarded to the develpment team.
The root cause of the problem is this error:
18:10:27 | !!!!!! ERROR !!!!!! = Attempt to read property “roles” on bool in file /home/customkt/public_html/wp-content/plugins/woocommerce-wholesale-prices/includes/wc-admin-notes/class-wwp-install-acfw.php line: 157
18:10:27 | !!!!!! EXCEPTION !!!!!! =in_array(): Argument #2 ($haystack) must be of type array, null given/home/customkt/public_html/wp-content/plugins/woocommerce-wholesale-prices/includes/wc-admin-notes/class-wwp-install-acfw.php:157This is caused by your running PHP 8.1 and plugins not fully compatible with PHP 8.1 specifically this code in class-wwp-install-acfw.php line: 157 which assumes that every user has a roles array – when it doesn’t. I have appended
?? []
To the code so that if $user->roles is null then it returns an array so that is_array can work.
The bug is in the plugin woocommerce-wholesale-prices
This is resolved by added the compatible code above and now mySites.guru can connect without issues to this site and run a snapshot.`
- The topic ‘MySites not connecting’ is closed to new replies.