Skip to content

Conversation

@KartaviK
Copy link
Contributor

I found another bug:

If my enumeration contains a constant with the value "null", then the isValidKey() method incorrectly checks the validity:

<?php

final class MyEnum extends \MyCLabs\Enum\Enum
{
    public const UNDEFINED = null;
}

$valid = MyEnum::isValidKey('UNDEFINED'); // will return false because of `isset` checking

@mnapoli mnapoli added the bug label Oct 30, 2018
@mnapoli
Copy link
Member

mnapoli commented Oct 30, 2018

Thanks!

@mnapoli mnapoli merged commit 76dd4ad into myclabs:master Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants