Skip to content

Fatal error on creating consignment for pickup point #313

@alexroosenstein

Description

@alexroosenstein

When creating a consignment and supplying it with an address of a pickup point the following fatal error occurs.
For reproduction purposes, the address apparently belongs to "De Kade Post".
I am using an older version of this library, but the relevant code seems identical to the current version.

<br />
<b>Fatal error</b>:  Uncaught TypeError: Argument 1 passed to MyParcelNL\Sdk\src\Model\Consignment\AbstractConsignment::setPickupNumber() must be of the type string, integer given, called in /myparcelnl/sdk/src/Adapter/ConsignmentAdapter.php on line 214 and defined in myparcelnl/sdk/src/Model/Consignment/AbstractConsignment.php:1640
Stack trace:
#0 myparcelnl/sdk/src/Adapter/ConsignmentAdapter.php(214): MyParcelNL\Sdk\src\Model\Consignment\AbstractConsignment-&gt;setPickupNumber(111)
#1 myparcelnl/sdk/src/Adapter/ConsignmentAdapter.php(184): MyParcelNL\Sdk\src\Adapter\ConsignmentAdapter-&gt;setByMethods(Array, Array)
#2 myparcelnl/sdk/src/Adapter/ConsignmentAdapter.php(44): MyParcelNL\Sdk\src\Adapter\ConsignmentAdapter-&gt;pickup()
#3 myparcelnl in <b>myparcelnl/sdk/src/Model/Consignment/AbstractConsignment.php</b> on line <b>1640</b><br />

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions