Skip to content

Cassette Name Passed to substr May be Null #29

Closed
@chrisguitarguy

Description

@chrisguitarguy

if (substr($cassetteName, -5) === '.json') {
VCR::configure()->setStorage('json');
}

If, for instance, the test doesn't have a @vcr annotation, that value (from array_pop($parsed)) may be null. This causes a TypeError due to the strict_types declaration.

Probably could be fixed by moving the empty($cassetteName) check before the check for a .json extension.

if (empty($cassetteName)) {
return;
}

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