Skip to content

Laravel 9 Unexpected datetime behaviour on Null datetime field #2553

Closed
@cyberdude4

Description

@cyberdude4
  • Laravel-mongodb Version: 9
  • PHP Version: 8.2
  • Database Driver & Version:

Description:

Steps to reproduce

  1. Create/store null or empty datetime field in collection
  2. add this datetime field in collection model in protected $cast array
  3. try to fetch data from collection
  4. and check null date will show as Current date

Expected behaviour

After fetching data from collection the Null or empty date fields should return null value or empty value - not current datetime

Actual behaviour

Insted of return null or empty field it returning current datetime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions