Problem/Motivation

The following deprecation is observed when creating, editing or even just visiting the Edit tab of a piece of content when running PHP 8.1:

Deprecated function: Automatic conversion of false to array is deprecated in form_builder() (line 1908 of [mysite]/includes/form.inc).

Steps to reproduce

Visit the Edit tab of a content node;
Check the log.

Proposed resolution

The source of this deprecation has been traced to line 32 of save_draft.module:

    $form['options']['status'] = false;

Changing this to:

    $form['options']['status'] = array();

fixed this for me.

Remaining tasks

Create a patch, test and commit. (Creating a patch is not something I know how to do I'm afraid.)

User interface changes

None

API changes

None

Data model changes

None

Issue fork save_draft-3404137

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

SteveWilson created an issue.

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