marvinlabs / laravel-html-bootstrap-4

Bootstrap 4 fluent HTML builder
MIT License
42 stars 15 forks source link

Radio checked comparison too strict #39

Closed axyr closed 6 years ago

axyr commented 6 years ago

->checked($this->getFieldValue($this->name, $this->selectedOption === $radio->getValue()))

This wont work :

$options = array [1,2,3];
$checked = "1";

Ofcourse $checked could be casted to int, but for this situation using === is way to strict and == should be used.

vpratfr commented 6 years ago

Ok. Can you submit a PR against the develop branch?

vpratfr commented 6 years ago

Should be fixed with 1.6.0. Do not hesitate to re-open with some additional info to reproduce.