Skip to content

Exception in Resource::toResourceObject() #91

@alslimany

Description

@alslimany

While trying to read allowance weight for traveler, the infants has no weight information.
But when calling getIncludedCheckedBags() method it's throw an exception.

TypeError
Amadeus\Resources\Resource::toResourceObject(): Argument #1 ($object) must be of type object, null given, called in /Users/abdullahishtiwy/Sites/booking-core/vendor/amadeus4dev/amadeus-php/src/resources/FlightFareDetailsBySegment.php on line 98.

and there is no way to check if it has a data or not.

https://github.com/amadeus4dev/amadeus-php/blob/f7249b5659976ee838dee0222497e547937fba93/src/resources/FlightFareDetailsBySegment.php#L94

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions