PHP 7.4 error accessing array offset on value of type null
Closed, ResolvedPublic

Description

When accessing Special:CargoExport with only ?table=foo I get the following error:

Trying to access array offset on value of type null in extensions/Cargo/includes/specials/CargoExport.php on line 46

Event Timeline

Is this really related to the PHP version? I mean, the code is trying to access an array index that doesn't exist - I would think that would cause problems in any version.

Yes it is - in the sense that if pre 7.4 a null result of array access was accepted by your code, now there's a warning.

Oh, okay. Well, I'm pretty sure that just setting a "table" value in the query string for Special:CargoExport won't work with any PHP version - although the error message is probably different, depending on the version.