Closed (fixed)
Project:
Taxonomy Access Control Lite
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Sep 2022 at 10:11 UTC
Updated:
4 Mar 2026 at 01:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kris77 commentedComment #3
rik.henkieInstead of casting to array I added a fallback. This way you don't have to convert to an array (solution stays the same).
Comment #4
kris77 commentedThank you so much @rik.scholten
Your patch works fine for me. Drupal 9.45 and PHP 8.1
Comment #5
rik.henkieAfter reviewing this code with a co-worker we realized there was a better solution. This should work the same, without the use of count() and without setting a fallback.
if $vids = NULL it skips the if statement.
if $vids = [] it skips the if statement.
if $vids contains items it continues inside the if statement
I don't know how I didnt see this earlier but this should be the best solution!
Comment #6
kris77 commentedThanks @rik.scholten
Comment #7
liam morlandThis fix is a start and would be a good idea in any case.
I am seeing this after having enabled
tac_litebut not doing any config. If there are no schemes configured, it should not show the "Scheme 1" tab at all and visiting the URL should give a 404.Comment #8
msankhala commentedPatch #5 works fine. If there are no schemes configured then the "Scheme 1" tab shows proper instructions:
First, select one or more vocabularies on the settings tab. Then, return to this page to complete configuration.Which I believe is good enough, instead of hiding the "Scheme 1" entirely until you select the vocabulary.
Comment #9
tvalimaa commentedPatch works with tac_lite (2.0.1).
Can this be put forward because without this patch clean install tac_lite will always gives fatal error and this issue is old.
Comment #10
jannakha commentedthank you for your contribution.
fix works.
Comment #12
liam morlandI created a merge request with the patch in #5.
Comment #13
vladimirausThanks for your contributions. Committed.