Submitting form with number field returns the following error:

Deprecated function: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in webform_number_format_match() (line 844 of /docroot/sites/all/modules/webform/components/number.inc).

Issue fork webform-3365243

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

VladimirAus created an issue. See original summary.

vladimiraus’s picture

Status: Active » Needs review
Issue tags: +PHP 8.1
liam morland’s picture

Status: Needs review » Needs work

This doesn't do exactly the same thing. Consider if $value is zero. Casting to string might be the better solution or an approach that skips the preg_match() call when $value is null.

liam morland’s picture

Status: Needs work » Closed (outdated)

Drupal 7 is no longer supported. If this applies to a supported version, please re-open.

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

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

Maintainers, please credit people who helped resolve this issue.