plivo / plivo-php

Plivo PHP Helper Library
http://www.plivo.com
MIT License
110 stars 117 forks source link

powerpack related code bug #246

Closed yespire closed 2 years ago

yespire commented 2 years ago

Plivo/Resource/Message/MessageInterface.php

            $src = $arguments[0];
            $dst = $arguments[1];
            $text = $arguments[2];
            $optionalArgs = $arguments[3];
            $powerpackUUID = $arguments[4];    // L169 (new code)

Clients may not have the new "powerpack", L169 will incur exception

we handled this via client app wrapper when creating message:

        $message = $this->get_client(__FUNCTION__)->messages->create(
            $from,
            [$to],
            $message,
            $optional,
            NULL  // $powerpack_uuid  ~ vendor/plivo/php-sdk/src/Plivo/Resources/Message/MessageInterface (L-169)
        );

        return $message->getMessageUuid()[0];

BUT ideally SDK should not cause this kind of exception.

yespire commented 2 years ago

Closing it as there is already a pull request on the same issue