Skip to content

bug: PostgrestErrorException property accessed before initialization error #5

@CptKirk

Description

@CptKirk

Describe the bug
In PostgrestErrorException the properties are not initialized with null which can cause a crash if one acesses these properties without isset(). This is unexpected behaviour and should be fixed.

To Reproduce
Initialize PostgrestErrorException with an exception other than React\Http\Message\ResponseException and access any property.

<?php
$previous = new Exception();
$test = new PostgrestErrorException($previous);
$status = $test->getStatusCode(); # causes error

Expected behavior
The properties should be initialized with null, so no unexpected errors occure.

Further Code
n/a

Setup
n/a

Additional context
n/a

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions