CMS MADE SIMPLE FORGE

JMDownMan

 

[#12408] PHP 8.0 Fatal errors fixed quickly

avatar
Created By: Simon (creopard)
Date Submitted: Thu Jan 28 10:30:52 -0500 2021

Assigned To: Fernando Morgado (JoMorg)
Version: 1.RC.2
CMSMS Version: 2.2.15
Severity: Major
Resolution: None
State: Open
Summary:
PHP 8.0 Fatal errors fixed quickly
Detailed Description:
Hi there,
testing this module on PHP8 for the first time, some fatal errors occured at the
frontend that can easy be fixed:

#1: Fatal error: Array and string offset access syntax with curly braces is no
longer supported in
/home/creopard/public_html/modules/JMDownMan/JMDownMan.module.php on line 725
 
#2: Fatal error: Array and string offset access syntax with curly braces is no
longer supported in
/home/creopard/public_html/modules/JMDownMan/JMDownMan.module.php on line 799
  
#3: Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use
either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in
/home/creopard/public_html/modules/JMDownMan/action.do_download.php on line 46

#1: changle line to          if($v[$j][0] == '$')
#2: changle line to         if($tv[0] == '$') // we get a referal
#3: change line to $alias = isset($params['alias']) ? $params['alias'] :
(isset($_SESSION['alias']) ? $_SESSION['alias'] : NULL);

Backend of the module not tested yet...


History