Whenever I go to Extras > Installer I get this error:
core/model/modx/processors/workspace/packages/getlist.class.php : 195) PHP warning: Trying to access array offset on value of type null
Also when I try to update an extra (in this case Commerce) I get a very long “Saving…” prompt after which no updating is initiated and the following errors appear:
core/model/modx/transport/modtransportpackage.class.php : 377) PHP warning: filesize(): stat failed for https://rest.modmore.com/[...]
core/model/modx/transport/modtransportpackage.class.php : 651) PHP warning: A non-numeric value encountered
The same errors appeared after updating the Image+ extra (with a different url for the filesize stat error ofc), with the small difference that the update actually went through and is not stuck on the “Saving…” prompt.
These log messages are only “PHP warnings”, so the correct working of your site is probably not affected by them.
The first warning (Trying to access array offset on value of type null) occurs, because the code tries to get update information from the package provider but receives an unexpected response.
You could change this line
to for example this code.
if (!is_array($updates)){
$this->modx->log(modX::LOG_LEVEL_ERROR, 'Wrong checkForUpdates result for package ' . $package->get('signature'));
$packageArray['updateable'] = false;
} else {
$packageArray['updateable'] = (int)$updates['count'] >= 1 ? true : false;
}
You won’t see the PHP warning anymore, but the package provider still returns the wrong response.
(The code above logs for which package the warning occurs.)
What is the response and the response code of the AJAX-request in the “Network” tab of the developer tools in the browser?