Skip to content

\RavenDB\Documents\Commands\GetDocumentsCommand::withStartWith() throw on not null but empty prefix #57

@Geolim4

Description

@Geolim4

Hello,

Method \RavenDB\Documents\Commands\GetDocumentsCommand::withStartWith throw when $startWith is an empty string (but is not null), while an empty string is working and theoretically a valid prefix.

Solution:

Replace:

        if (empty($startWith)) {
            throw new IllegalArgumentException("startWith cannot be null");
        }

by:

        if ($startWith === null) {
            throw new IllegalArgumentException("startWith cannot be null");
        }

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