Problem/Motivation

When saving an entity with a datetime as a selected unique field the following error occurs:

Error: Call to a member function format() on null in _unique_field_process_date_value() (

Steps to reproduce

  1. Add a datetime field
  2. Set a configuration for it to be unique
  3. Try creating an entity

Proposed resolution

Add a condition to check whether the datetime field has value before processing it

Remaining tasks

User interface changes

API changes

Data model changes

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

evilargest created an issue. See original summary.

evilargest’s picture

Assigned: Unassigned » evilargest

evilargest’s picture

Assigned: evilargest » Unassigned
Status: Active » Needs review

astonvictor’s picture

Status: Needs review » 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.