File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/Symfony/Component/Notifier/Bridge/LightSms Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ protected function doSend(MessageInterface $message): SentMessage
123123 throw new TransportException ('Unable to send the SMS: ' .self ::ERROR_CODES [$ content ['error ' ]], $ response );
124124 }
125125
126- $ phone = preg_replace ( " /[^\d]/ " , '' , $ message ->getPhone ());
126+ $ phone = $ this -> escapePhoneNumber ( $ message ->getPhone ());
127127 if (32 === $ content [$ phone ]['error ' ]) {
128128 throw new TransportException ('Unable to send the SMS: ' .self ::ERROR_CODES [$ content ['error ' ]], $ response );
129129 }
@@ -159,6 +159,6 @@ private function escapeSubject($subject): string
159159
160160 private function escapePhoneNumber ($ phoneNumber ): string
161161 {
162- return str_replace ( ' + ' , '' , $ phoneNumber );
162+ return preg_replace ( " /[^\d]/ " , '' , $ phoneNumber );
163163 }
164164}
You can’t perform that action at this time.
0 commit comments