platform icon indicating copy to clipboard operation
platform copied to clipboard

Overwriting title to null displays value 1

Open pLavrenov opened this issue 1 year ago • 1 comments

Overwriting title to null displays value 1

Describe the bug When the value of ->title() is overwritten to null in the form, the value 1 is displayed on the page because it passes the isset() check, and the value of $field->get('title') equals true.

To Reproduce

$field = Input::make()->title('Test')->title(null);
dd($field->get('title') === true);

pLavrenov avatar Jul 24 '24 12:07 pLavrenov

Since you did not specify which version of the package you are using, I will assume it is the latest available. I am unable to reproduce your example; you can see that I have added it to the tests, and the results can be viewed on the tab at https://github.com/orchidsoftware/platform/actions.

If you are using an older version, I recommend updating to the latest one.

tabuna avatar Jul 25 '24 07:07 tabuna