CMS MADE SIMPLE FORGE

LISE

 

[#12615] PHP 8 Error after Updating to Version 1.5.4

avatar
Created By: Daniel Pest (DPC)
Date Submitted: Mon May 15 13:27:52 -0400 2023

Assigned To: Fernando Morgado (JoMorg)
Version: 1.5.4
CMSMS Version: 2.2.16
Severity: None
Resolution: None
State: Open
Summary:
PHP 8 Error after Updating to Version 1.5.4
Detailed Description:
Hi,
after updating I get this error message:

Fatal error: Uncaught Error: Call to a member function GetId() on null in
/homepages/17/d878542441/htdocs/cmsms/modules/LISE/framework/action.default.php:207

Change this Original code from line 200 till 208 in
/modules/LISE/framework/action.default.php will help:

if( !is_numeric($detailpage) )
{
  if( !isset($hm) )
  {
    $hm = cmsms()->GetHierarchyManager();
  }
  
  $detailpage = $hm->sureGetNodeByAlias($detailpage)->GetId();
}

to this:

if (!is_numeric($detailpage)) {
  if (!isset($hm)) {
    $hm = cmsms()->GetHierarchyManager();
  }

  $node = $hm->sureGetNodeByAlias($detailpage);
  if ($node !== null) {
    $detailpage = $node->GetId();
  } else {
    // Alias not found
  }
}



History