Skip to content

get method nulls 0 value #14

@alexleonard

Description

@alexleonard

Hey Shawn,

I've just encountered an issue using ::get().

I have a form model called RegistrationForm

In step one post I do a sample:

RegistrationForm::set('test', 0);

Then in step two get I run:

var_dump(RegistrationForm::all());
var_dump(RegistrationForm::get('test'));

And that outputs

array(1) {
    ["test"]=>int(0)
}

NULL

This causes me an issue using either bool or int inputs on the registration form. I can get around it at the moment by assigning RegistrationForm::all() to a variable and just picking the values from there, but it looked like an issue to me so I thought I'd post it here.

Cheers!
Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions