CMS MADE SIMPLE FORGE

CMSMSExt

 

[#12765] undefined array key "defer_js" shows up in php error logs under PHP 8.1

avatar
Created By: Scott R. Godin (WebDragon)
Date Submitted: Mon Dec 02 14:15:37 -0500 2024

Assigned To: Fernando Morgado (JoMorg)
Version: 1.5.1
CMSMS Version: 2.2.21
Severity: Minor
Resolution: None
State: Open
Summary:
undefined array key "defer_js" shows up in php error logs under PHP 8.1
Detailed Description:
` Undefined array key "defer_js" in
/home/USERNAME/public_html/devel/modules/CMSMSExt/lib/jsloader/class.jsloader.php
on line 602`

setting $config['xt_defer_js']   = TRUE; in cfg.inc silences the warnings but
thought you should know about the warning nonetheless.

had mentioned it back at the end of October in the slack but forgot to file a BR
and we were both a tad preoccupied at the time. LOL


History

Comments
avatar
Date: 2025-07-29 11:03
Posted By: Chris Taylor (chrisbt)

class.jsloader.php line 602:

was:
if($conf['xt_defer_js'] || $opts['defer_js'])

change to:
if($conf['xt_defer_js'] || isset($opts['defer_js']))

also sorts it