CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12541] Module ModuleManager 2.1.8 : corrections + compatible php 7.1.0 to 8.1.4

avatar
Created By: Philippe Thomas (filto)
Date Submitted: Mon Apr 18 22:17:44 -0400 2022

Assigned To:
Version: None
CMSMS Version: 2.2.16
Severity: Minor
Resolution: Fixed
State: Open
Summary:
Module ModuleManager 2.1.8 : corrections + compatible php 7.1.0 to 8.1.4
Detailed Description:
modules/ModuleManager/lib/class.modmgr_utils.php

L187 undefined $server_md5 in function get_module_xml

throw new
CmsInvalidDataException($mod->Lang('error_checksum',array($server_md5,$dl_md5)));
#--- correction
throw new CmsInvalidDataException($mod->Lang('error_checksum', array($md5sum,
$dl_md5)));


##########
#-- make compatibility PHP versions from php 7.1.0 to 8.x.x : prevent compatible
notice

--------------
modules/ModuleManager/lib/class.ModuleManagerModuleInfo.php

L77
public function OffsetGet($key)
#--- correction
#[\ReturnTypeWillChange]
public function OffsetGet($key)

L131
 if( $key == 'deprecated' ) {
            // test if this module is deprecated
            if( in_array($this['name'],self::$_deprecated) ) return TRUE;
            return FALSE;
        }
}
#--- correction
 if( $key == 'deprecated' ) {
            // test if this module is deprecated
            if( in_array($this['name'],self::$_deprecated) ) return TRUE;
            return FALSE;
        }
  return null;
}

L138
public function OffsetSet($key,$value)
#--- correction
public function OffsetSet($key,$value):void

L145
 public function OffsetExists($key)
#--- correction
  public function OffsetExists($key):bool

L148
 if( $key != 'e_status' && $key != 'deprecated' ) return; // dynamic
 #--- correction
 if( $key != 'e_status' && $key != 'deprecated' ) return false; // dynamic


History

Comments
avatar
Date: 2022-04-20 12:06
Posted By: Fernando Morgado (JoMorg)

Fixed the pertinent bits in SVN, thanks
      
Updates

Updated: 2022-04-20 12:06
resolution_id: 5 => 7
severity_id: 2 => 3

Updated: 2022-04-18 22:18
resolution_id: => 5
severity_id: 12 => 2
cmsms_version_id: -1 => 31780