by eggsurplus

Control what your users can access and save time, money, and frustrations. Lock down sensitive data in SugarCRM or SuiteCRM to specific groups or teams. Supports unlimited assigned users, unlimited group assignments to records, custom layouts for each group, login/sudo capabilities and much more.

Free Trial

By clicking you consent to share your profile with the developer

#2581 - Compatibility with PHP 7.0

Closed Bug? created by mminnie 8 years ago
In PHP 7.0 there is a change: From [php.net - Calls from incompatible context removed](http://php.net/manual/en/migration70.incompatible.php) > Previously deprecated in PHP 5.6, static calls made to a non-static method with an incompatible context will now result in the called method having an undefined $this variable and a deprecation warning being issued. When running under PHP 7.0+ the code in SecurityGroup.php breaks when making references to $this. Example: ~~~ function assign_default_groups(&$focus,$isUpdate) { global $sugar_config; global $current_user; if(!$isUpdate) { $defaultGroups = SecurityGroup::retrieveDefaultGroups(); // <-- Class function called statically ....... ~~~ In the function retrieveDefaultGroups: ~~~ function retrieveDefaultGroups() { $default_groups = array(); $query = "select securitygroups_default.id, securitygroups.name, securitygroups_default.module, securitygroups_default.securitygroup_id " ."from securitygroups_default " ."inner join securitygroups on securitygroups_default.securitygroup_id = securitygroups.id " ."where securitygroups_default.deleted = 0 and securitygroups.deleted = 0"; $GLOBALS['log']->debug("SecuritySuite: Retrieve Default Groups: $query"); $result = $this->db->query($query); // <----- This produces a PHP Fatal error ~~~ **Could all the references to $this->db be changed to $GLOBALS['db'] ??**
  1. eggsurplus member avatar

    eggsurplus Provider Affiliate

    8 years ago

  2. mminnie member avatar

    mminnie

    8 years ago

  3. eggsurplus member avatar

    eggsurplus Provider Affiliate

    8 years ago

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
Rating
  • "Couldn't do without it. Highly recommended and I guarantee that you will not find another alternative."

    Read More Reviews