Skip to content

Regression in loading a DistributionList #271

@alecpl

Description

@alecpl

I upgraded to v0.11 and got a lot of problems that I solved on my end. However, this one might be a bug.

I'm using a playback file with this content:

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
  <s:Header>
    <h:ServerVersionInfo xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:x
  </s:Header>
  <s:Body>
    <m:GetItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:
      <m:ResponseMessages>
        <m:GetItemResponseMessage ResponseClass="Success">
          <m:ResponseCode>NoError</m:ResponseCode>
          <m:Items>
            <t:DistributionList>
              <t:ItemId Id="AAMkAGEzOGRlODRiLTBkN2ItNDgwZS04ZDJmLTM5NDEyY2Q0NGQ0OABGAAAAAAC9tlDYSlG2TaxWBrA1OzWtBwAs2ajhknXlRYN/pbC8JqblAAAAAAEOA
              <t:Subject>nowa lista</t:Subject>
              <t:LastModifiedTime>2024-06-27T13:44:32Z</t:LastModifiedTime>
              <t:DisplayName>nowa lista</t:DisplayName>
              <t:FileAs>nowa lista</t:FileAs>
              <t:Members>
                <t:Member Key="AAAAAIErH6S+oxAZnW4A3QEPVAIAAAGAYQBsAGUAYwBAAGEAbABlAGMALgBwAGwAAABTAE0AVABQAAAAYQBsAGUAYwBAAGEAbABlAGMALgBwAGwAAA
                  <t:Mailbox>
                    <t:Name>alec@kolab.org</t:Name>
                    <t:EmailAddress>alec@kolab.org</t:EmailAddress>
                    <t:RoutingType>SMTP</t:RoutingType>
                    <t:MailboxType>OneOff</t:MailboxType>
                  </t:Mailbox>
                  <t:Status>Normal</t:Status>
                </t:Member>
                <t:Member Key="AAAAAMCRrdNRnc8RpKkAqgBH+qS1AAAAANynQMjAQhAatLkIACsv4YIBAAAAAAAAAC9vPUV4Y2hhbmdlTGFicy9vdT1FeGNoYW5nZSBBZG1pbmlzdH
                  <t:Mailbox>
                    <t:Name>Christian Mollekopf</t:Name>
                    <t:EmailAddress>christian@outlook.com</t:EmailAddress>
                    <t:RoutingType>SMTP</t:RoutingType>
                    <t:MailboxType>Mailbox</t:MailboxType>
                  </t:Mailbox>
                  <t:Status>Normal</t:Status>
                </t:Member>
              </t:Members>
            </t:DistributionList>
          </m:Items>
        </m:GetItemResponseMessage>
      </m:ResponseMessages>
    </m:GetItemResponse>
  </s:Body>
</s:Envelope>

The error I got is:

TypeError: garethp\ews\API\Type\DistributionListType::setMembers(): Argument #1 ($value) must be of type garethp\ews\API\Type\MemberType|array, stdClass given, called in /home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php on line 22

/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/Type/DistributionListType.php:127
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/MagicMethodsTrait.php:22
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/NTLMSoapClient.php:120
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices/MiddlewareFactory.php:18
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices.php:518
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices/MiddlewareFactory.php:32
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices.php:518
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices/MiddlewareFactory.php:48
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices.php:518
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices/MiddlewareFactory.php:55
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices.php:518
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices/MiddlewareFactory.php:66
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices.php:518
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices.php:528
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API/ExchangeWebServices.php:315
/home/alec/repos/kolab/src/vendor/garethp/php-ews/src/API.php:408
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions