Verify that this module is compatible with PHP 8.

PHP 7 is under 'active' support until 28 Nov 2021.

Comments

mark_fullmer created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs work
StatusFileSize
new1.11 KB

Here's a start

mstrelan’s picture

StatusFileSize
new1.89 KB

Take 2

mstrelan’s picture

StatusFileSize
new21.45 KB
mstrelan’s picture

StatusFileSize
new2.92 KB
mstrelan’s picture

StatusFileSize
new2.92 KB

That last patch should have added an else. I had removed part of a condition because it had already been evaluated earlier. I'd say there is certainly room to clean up all these nested ifs and in_arrays but that's perhaps better in a separate issue.

mstrelan’s picture

Status: Needs work » Needs review
mark_fullmer’s picture

Assigned: Unassigned » mark_fullmer

Thanks so much for contributing this! It looks like the underlying issue was just PHP 8's enforcement that an array element being called needs to exist.

I'd like to double-check one logic thing related to the change from if to elseif, but I assume we'll be able to fix this soon!

  • mark_fullmer committed 3416205 on 8.x-2.x
    Issue #3222209 by mstrelan, mark_fullmer: Compatibility with PHP 8
    
mark_fullmer’s picture

Status: Needs review » Fixed

Agreed that the elseif is correct, given the removal of && !in_array($category, array_values($restricted_categories[$region_to])) in the conditional.

And yep, this code could use a simplification/cleanup task, but let's save that for a dedicated issue.

Thanks again for the contribution!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.