cmsms 2.2.16 PHP 8.1.0 blank screen on import design

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
SolsWebdesign
New Member
New Member
Posts: 2
Joined: Mon May 23, 2022 9:14 am

cmsms 2.2.16 PHP 8.1.0 blank screen on import design

Post by SolsWebdesign »

Hello,

I have CmsMadeSimple 2.2.16 running on PHP 8.1.0 and want to import a new design and am getting the following error":
PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /...../public_html/modules/DesignManager/lib/class.dm_design_reader.php:56

I think it may be PHP 8.1.0 related but since I can't downgrade this particular package I thought I'd ask here first. Anyone encountered this? Is there a ready made solution available?
kind regards,
Isolde
SolsWebdesign
New Member
New Member
Posts: 2
Joined: Mon May 23, 2022 9:14 am

Re: cmsms 2.2.16 PHP 8.1.0 blank screen on import design

Post by SolsWebdesign »

Code: Select all

private function _scan()
    {
        $in = array();
        $__get_in = function() use ($in) {
            global $in;
            if( ($n = count($in)) ) {
                return $in[$n-1];
            }
        };
        switch( $this->_xml->localName ) {
        case 'name':
                        if( $__get_in() != 'design' ) {
meaning that if $in (which is an empty array) should give back the fore-last value it has (not possible) and this should not be equal to the string 'design'.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1619
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: cmsms 2.2.16 PHP 8.1.0 blank screen on import design

Post by DIGI3 »

The next version will have more PHP 8.1 support, but you may wish to file this as a bug report. Code shouldn't be posted here as per forum rules, and it's less likely to be seen by the devs actually working on the core.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “CMSMS Core”