Skip to content

Conversation

@inxilpro
Copy link
Collaborator

#131 changed the signature of SettledResult::throw so that calling ->throw() without a parameter is no longer allowed. This just sets the default to NULL so that it's backwards-compatible.

@daniel-g-wood
Copy link

Hey @inxilpro , unfortunately this will still fail in some cases. If you pass null to this function and there are errors, it fails on $this->errorAsString($numberOfBacktraces). errorAsString requires an int parameter, so it throws a type error there instead. You'll also need make the following change (or something like this):

    public function errorAsString(?int $numberOfBacktraces = 2)
    {
        $numberOfBacktraces ??= 2;
        ....
    }

Ensures that the errorAsString method receives a default value of 2 for numberOfBacktraces if none is provided, preventing potential null value issues.
@inxilpro inxilpro merged commit e30df1a into aarondfrancis:main Aug 22, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants