salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.53k stars 2.09k forks source link

Relationship::get_other_module() cannot be called statically #10151

Open kale1d0code opened 1 year ago

kale1d0code commented 1 year ago

Issue

Expected Behavior

CRM system to not crash when creating a new product

Actual Behavior

CRM system crashes because security groups is trying to call get_other_module on the Relationship class statically. Record is saved if the user checks the list of products

Possible Fix

fix the Relationship class so that get_other_module is a static function or fix the call sites for Relationship::get_other_module so that they create a new instance of relationship like so (new Relationship())->get_other_module(...)

Steps to Reproduce

  1. create a product

Context

Admin staff are unsure if products have been created or not.

Your Environment

johnM2401 commented 1 year ago

Hey @kale1d0code !

Thanks for getting in touch!

I've given this a try in the latest release, (7.14.0), and I cannot replicate this issue.

7.14.0 did have a large number of PHP8 Compatability fixes/changes included, which may have resolved this issue.

Would you be able to try this in the latest release and let me know if you are still experiencing this issue?

If so, we may need some further information to replicate. (ie: error logs / further steps to replicate / etc)

Thanks!

kale1d0code commented 1 year ago

This is still an issue in 7.14.0 however I believe the culprit is the Security Suite plugin

kale1d0code commented 1 year ago

get_other_module is a normal public function in my CRM that is on version 7.14.0