Skip to content

[2.1|3.0]: Blank Regex validation causes error #9366

Description

@jdarwood007

Basic Information

If you create a custom field using the regex validation and do not supply a regex string, an error occurs when its displayed

Steps to reproduce

  1. Create Custom profile field
  2. Set validation to regex
  3. Leave regex string input empty
  4. Set to display on members profile
  5. View members profile

Expected result

No error

Actual result

 C:/htdocs/smf/Sources/Profile-Modify.php (Line 1342)
Backtrace information

Type of error: General
Error message
Select
2: preg_match(): Empty regular expression

Version/Git revision

2.1.8

Database Engine

All

Database Version

na

PHP Version

na

Logs

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions