Problem/Motivation

after enabeling on D10 php8.2
cleared cache
TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 63 of modules/contrib/redirect_anonymous_users/src/EventSubscriber/RedirectAnonymousSubscriber.php).

Steps to reproduce

D10 php8.2
enable module
go to site in incognito

Proposed resolution

fix

Remaining tasks

fix

Comments

ikeigenwijs created an issue. See original summary.

ikeigenwijs’s picture

dirty hack

    if ($excludedRoutes === null){$excludedRoutes = array();}

helps but seems not enough,

sarwan_verma’s picture

Assigned: Unassigned » sarwan_verma
sarwan_verma’s picture

Assigned: sarwan_verma » Unassigned
Status: Active » Needs review
StatusFileSize
new666 bytes

Hi @ikeigenwijs,

I have fixed this issue "TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (line 63 of modules/contrib/redirect_anonymous_users/src/EventSubscriber/RedirectAnonymousSubscriber.php)" and also attached patch,

please review and verify.

BossElijah’s picture

This looks good to me

  • BossElijah committed e9e8d4e9 on 1.0.x
    git commit -m 'Issue #3414770 by sarwan_verma: TypeError: in_array():...
BossElijah’s picture

Fixed in 1.0.2!

BossElijah’s picture

Assigned: Unassigned » BossElijah
Status: Needs review » Fixed
BossElijah’s picture

Status: Fixed » Closed (fixed)