Tickets / BUG-2
Released Medium BUG · OPENED 28 AUG 2026 · 0 REPLIES

aerocommerce/shipstation

SF Stephen Fuller · teclan Ltd
Public
Log in to upvote, comment, or submit your own tickets.
Getting following error when shipstation calls webhook. [object] (TypeError(code: 0): Aero\Shipstation\Http\Controllers\WebhookController::getParcelVolume(): Argument #1 ($dimensions) must be of type object, null given. Looking at WebhookController.php:166: 'volume' => $this->getParcelVolume($shipment->dimensions), The method signature at WebhookController.php:80 requires: protected function getParcelVolume(object $dimensions): float When ShipStation sends a webhook for a shipment without dimensions data, $shipment->dimensions is null, which violates the strict type constraint. Possible solution - change the method signature to accept nullable objects: height, $dimensions->length, $dimensions->width)) { return 0; } // ... rest of method } This is more defensive and handles the null case gracefully without requiring callers to pre-validate. The logic already has a safety check for missing properties, so it makes sense to also handle the null case directly in the method.

No replies yet.

Log in to join the discussion.