Problem/Motivation

The module is throwing the following error:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 2 passed to _readonlymode_form_list_check() must be of the type array, string given, called in /docroot/modules/contrib/readonlymode/readonlymode.module on line 229 in _readonlymode_form_list_check() (line 250 of modules/contrib/readonlymode/readonlymode.module).

Steps to reproduce

Proposed resolution

See the following patch.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 argument-passed-as-string-3354694.patch522 bytesoptasy
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

optasy created an issue. See original summary.

optasy’s picture

StatusFileSize
new522 bytes

Patch attached

altcom_neil’s picture

We are using this patch now that the https://www.drupal.org/project/readonlymode/issues/3224538 has been applied.

Works as intended.

This should be a high priority as this causes a fatal error in PHP 8+.

phily’s picture

Status: Active » Reviewed & tested by the community

Patch #2 works for me using Drupal 10.3.6 and PHP 8.3
Same result for altcom_neil in the above comment, so moving this issue to RTBC.

astonvictor made their first commit to this issue’s fork.

astonvictor’s picture

Added all changes as a new MR. I also updated a description for the $list argument.

sharique made their first commit to this issue’s fork.

sharique’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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