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 fe26644 commit 775d004Copy full SHA for 775d004
src/Stringy.php
@@ -139,7 +139,11 @@ public function camelize()
139
$stringy->str = preg_replace_callback(
140
'/[-_\s]+(.)?/u',
141
function ($match) use ($encoding) {
142
- return $match[1] ? mb_strtoupper($match[1], $encoding) : '';
+ if (isset($match[1])) {
143
+ return mb_strtoupper($match[1], $encoding);
144
+ } else {
145
+ return '';
146
+ }
147
},
148
$stringy->str
149
);
0 commit comments