Skip to content

getGeo throwing fatal error #162

Open

Description

@jdorner4

Fatal error: Uncaught TypeError: Postmark\Models\PostmarkOpen::getGeo(): Return value must be of type Postmark\Models\PostmarkGeographyInfo, null returned in /vendor/wildbit/postmark-php/src/Postmark/Models/PostmarkOpen.php:68

Message was sent using a broadcast stream

$messageDetail = $client->getOpenStatisticsForMessage($message_id);

var_dump( $messageDetail->Opens[0]->getGeo() );

https://postmarkapp.com/developer/user-guide/tracking-opens indicates geo data is collected, but I'm not seeing the data anywhere

Activity

  1. ewood-ac commented on Jan 22, 2026

    @ewood-ac
    Contributor

    I am making some changes to the SDK to handle this better.

    Why Geo Data Might Be Missing

    Geo data may be missing when:

    • The message was sent via a broadcast stream (as in your case)
    • The IP address couldn't be geolocated
    • The open event occurred before geo tracking was enabled
    • Privacy settings or email client behavior prevents IP collection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions