Skip to content

Factory Muffin converts false values to empty strings #456

@kirkbushell

Description

@kirkbushell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions