Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factory Muffin converts false values to empty strings #456

Open
kirkbushell opened this issue Sep 12, 2018 · 1 comment
Open

Factory Muffin converts false values to empty strings #456

kirkbushell opened this issue Sep 12, 2018 · 1 comment

Comments

@kirkbushell
Copy link

This results in database errors when strict mode is enabled (for example, '' is an invalid value for a boolean field).

This happens when getGenerator in Base.php is working with a $kind of false. It explodes on |, resulting in an empty string, converting a false value. This does not happen with true boolean values.

My solution, if you're happy to have this resolved (we can't actually use strict mode in our integrated tests without it, as it fails each time), is to have getGenerator return $this->kind if $this->kind === false.

@GrahamCampbell
Copy link
Member

GrahamCampbell commented Sep 12, 2018

My solution, if you're happy to have this resolved

Sounds good. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants