marvinlabs / laravel-html-bootstrap-4

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

Argument 1 passed to Radio::description() must be of the type string #32

Closed axyr closed 6 years ago

axyr commented 6 years ago
bs()->radio('test')

gives the error:

Type error: Argument 1 passed to MarvinLabs\Html\Bootstrap\Elements\Radio::description() must be of the type string, null given

the MarvinLabs\Html\Bootstrap\Traits\BuildsForms::radio() method allows null values:

public function radio($name = null, $description = null, $isChecked = false)

but the Radio method description(string $text) does not allow null.

vpratfr commented 6 years ago

Woops. I had fixed it for checkboxes but that one slipped. Sorry. Will remove the type hint.

Can't wait for Laravel to require php 7.2 and thus nullable ?string type hints

vpratfr commented 6 years ago

Fixed