Closed (fixed)
Project:
Layout Builder Restrictions
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
5 Jul 2021 at 15:48 UTC
Updated:
23 Jul 2021 at 19:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mstrelan commentedHere's a start
Comment #3
mstrelan commentedTake 2
Comment #4
mstrelan commentedComment #5
mstrelan commentedComment #6
mstrelan commentedThat 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.
Comment #7
mstrelan commentedComment #8
mark_fullmerThanks 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
iftoelseif, but I assume we'll be able to fix this soon!Comment #10
mark_fullmerAgreed that the
elseifis 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!