Skip to content

Null value is ignored on fill method #277

@rodriciru

Description

@rodriciru

Invalid call of the function [setAgendaVisibleDesde], first Argument [agendaVisibleDesde] is of invalid type, Cannot cast String [] to a value of type [datetime]

When calling fill, the will try to invoke the setter, but wontcheck if the value is a defined null (https://quick.ortusbooks.com/guide/getting-started/defining-an-entity#null-values) so for a non required datetime it tries to set to an empty string, so it will fail.

Adding in the line 680 of BaseEntity this will fix that (I dont know what happens if tries to set a string field to empty):
if ( isNullValue( key, value ) ) { value = nullValue(); }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions