CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12556] DesignManager design importer throwing error in PHP8+

avatar
Created By: Matt Hornsby (DIGI3) (DIGI3)
Date Submitted: Tue Jul 26 10:21:13 -0400 2022

Assigned To:
Version: 2.2.16
CMSMS Version: 2.2.16
Severity: None
Resolution: Fixed
State: Closed
Summary:
DesignManager design importer throwing error in PHP8+
Detailed Description:
When importing a design xml into DesignManager, the following error is given:
PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of
type Countable|array, null given in
/path/modules/DesignManager/lib/class.dm_design_reader.php:56


History

Comments
avatar
Date: 2022-07-30 12:15
Posted By: Jean-Claude Etiemble (jce76350)

 Severity: Critical  = impossible to import a design


On PHP 8.1 I have these errors
1- Deprecated: Return type of dm_xml_reader::read() should either be compatible
with XMLReader::read(): bool, or the #[\ReturnTypeWillChange] attribute should
be used to temporarily suppress the notice in
/modules/DesignManager/lib/class.dm_xml_reader.php on line 53
line 53  public function read()

2- Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of
type Countable|array, null given in
/modules/DesignManager/lib/class.dm_design_reader.php on line 56
line 56 => if( ($n = count($in)) ) {

3-Fatal error: Uncaught TypeError: Cannot access offset of type string on string
in /modules/DesignManager/lib/class.dm_design_reader.php on line 451
line 451 =>  if( $tpl['key'] == $tpl2['key'] ) continue
      
avatar
Date: 2022-09-05 05:43
Posted By: Jean-Claude Etiemble (jce76350)

Not solved alway the same error on class.dm_design_reader.php line 450 ;)
if( $tpl['key'] == $tpl2['key'] ) continue;
on PHP  8.0, 8.1,  8.2
Please recheck 
      
avatar
Date: 2022-09-10 05:59
Posted By: Jean-Claude Etiemble (jce76350)

Test again with Révision 12796 and 97  all is OK 
      
Updates

Updated: 2022-09-10 18:43
resolution_id: => 7
state: Open => Closed