Hi,

I get the following error, when I call the user permissions

in_array(): Argument #2 ($haystack) must be of type array, null given 

Any idea?

I can modify every single user account and get a list of all users, only setting permissions doesn't work (it's a migrate of a drupal 7 website).

On a second website, with extactly same configuration and modules, but other user accounts, the permissions can be set.

I'm using the latest version of backdrop.

Most helpful answers

Thanks for clarifying. I think the issue might be with the slight difference in config structure between D7 and Backdrop and the upgrade path doesn't handle that.

Are you comfortable raising an issue for this in the Issue Queue (GitHub)?

For your current site, opening the settings for the module at /admin/config/content/override-node-options and saving, should set the config correctly and allow you to use PHP 8.3

 

ok, it seems the problem is PHP 8.3, on 7.4 I get acces to the page!

Thank you both! 🙏

edit: @onyx, yes it looks like your screenshot, but I can set the PHP Version to 7.4 and wait till the module is updates to work with 8.3

Comments

Have a look at the log messages, they should tell you which code/module is producing the error. .../admin/reports/dblog

Thanks onyx! 

TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in in_array() (Zeile 31 von /www/htdocs/.../modules/override_node_options/override_node_options.module).

ok, it the override_node_options module .. hm, I'll take a closer look at it, but if you have any ideas ..

Can I clarify, is this error happening when you open:

/admin/config/people/permissions or is it when you try to save changes?

What version of PHP are you using?

Hi yorkshirepudding,

the error happens, when I open /admin/config/people/permissions not on saving.

I use PHP 8.3, is it to high?

Try configuring that module first?

If line 30 below is null then you will see this issue in php 8+

ok, it seems the problem is PHP 8.3, on 7.4 I get acces to the page!

Thank you both! 🙏

edit: @onyx, yes it looks like your screenshot, but I can set the PHP Version to 7.4 and wait till the module is updates to work with 8.3

Can you try on PHP 8.1?

It will help to know how to narrow down.

on PHP 8.1 the error is still there - and my provider marks 8.1 as outdated ;) only 7.4 and 8.3 are marked as "ok"

Thanks for clarifying. I think the issue might be with the slight difference in config structure between D7 and Backdrop and the upgrade path doesn't handle that.

Are you comfortable raising an issue for this in the Issue Queue (GitHub)?

For your current site, opening the settings for the module at /admin/config/content/override-node-options and saving, should set the config correctly and allow you to use PHP 8.3

 

I've posted the error on Github, hope in correct form, I'm not a developer ;)

edit: the error occurs after saving and switching to PHP 8.3, so I let it to 7.4 at the moment ..

You've included everything relevant. Thank you. You don't need to be a developer to help; writing clear reproduceable bug reports helps people identify the cause and remedy of problems