Skip to content

1.3.16 throwing errors on arrays after assertCount #206

Open
@acbramley

Description

@acbramley

Our automated updates updated to 1.3.16 today and started failing phpstan. Based on the changes from 1.3.15 it's obvious what the issue is.

Our tests do something like this:

    $mails = $this->getMails();
    $this->assertCount(1, $mails);
    $mail = \reset($mails);
    $this->assertStringContainsString('foo', $mail['subject']);

Where getMails returns an array.

And this is throwing errors like Cannot access offset 'subject' on 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