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
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | argument-passed-as-string-3354694.patch | 522 bytes | optasy |
Issue fork readonlymode-3354694
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
Comment #2
optasy commentedPatch attached
Comment #3
eric_a commentedComment #4
altcom_neil commentedWe 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+.
Comment #5
philyPatch #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.
Comment #8
astonvictor commentedAdded all changes as a new MR. I also updated a description for the
$listargument.Comment #11
sharique commented