We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent caca23e commit 33ff92fCopy full SHA for 33ff92f
src/Bulksms.php
@@ -93,7 +93,11 @@ private function character_resolve(string $body): string
93
94
$ret_msg = '';
95
if (mb_detect_encoding($body, 'UTF-8') != 'UTF-8') {
96
- $body = mb_convert_encoding($body, 'UTF-8', 'auto');
+ $converted = mb_convert_encoding($body, 'UTF-8', 'auto');
97
+ if ($converted == false) {
98
+ throw new \RuntimeException('Failed to convert string encoding to UTF-8');
99
+ }
100
+ $body = $converted;
101
}
102
for ($i = 0; $i < mb_strlen($body, 'UTF-8'); $i++) {
103
$c = mb_substr($body, $i, 1, 'UTF-8');
0 commit comments