From 19f7a1140b90f67615b57e6e8ab1c07e051806be Mon Sep 17 00:00:00 2001 From: Abdulbasit Rubeya Date: Sat, 14 Sep 2024 10:53:56 +0300 Subject: [PATCH] Fix constructor to properly retrieve capabilities values Updated the `PhoneNumberCapabilities` constructor to correctly retrieve the values for `mms`, `sms`, `voice`, and `fax`. The case-sensitive keys for `MMS` and `SMS` were changed to uppercase, and default values are now `false` instead of strings. This resolves the issue where incorrect values were being assigned to the capabilities properties. --- src/Twilio/Base/PhoneNumberCapabilities.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Twilio/Base/PhoneNumberCapabilities.php b/src/Twilio/Base/PhoneNumberCapabilities.php index 59f001b11d..b1fb0467f5 100644 --- a/src/Twilio/Base/PhoneNumberCapabilities.php +++ b/src/Twilio/Base/PhoneNumberCapabilities.php @@ -20,10 +20,10 @@ class PhoneNumberCapabilities public function __construct(array $capabilities) { - $this->mms = Values::array_get($capabilities, 'mms', "false"); - $this->sms = Values::array_get($capabilities, 'sms', "false"); - $this->voice = Values::array_get($capabilities, 'voice', "false"); - $this->fax = Values::array_get($capabilities, 'fax', "false"); + $this->mms = Values::array_get($capabilities, 'MMS', false); + $this->sms = Values::array_get($capabilities, 'SMS', false); + $this->voice = Values::array_get($capabilities, 'voice', false); + $this->fax = Values::array_get($capabilities, 'fax', false); } /**