Skip to content

Commit 374ab4a

Browse files
committed
Fix preg_replace/trim null subject deprecation warnings
1 parent fbd6eff commit 374ab4a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/SDK/SDK.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,11 @@ protected function render(TemplateWrapper $template, $destination, $block, $para
741741
* @param string $str
742742
* @return string
743743
*/
744-
protected function helperCamelCase($str)
744+
protected function helperCamelCase($str): string
745745
{
746+
if ($str == null) {
747+
return '';
748+
}
746749
$str = preg_replace('/[^a-z0-9' . implode("", []) . ']+/i', ' ', $str);
747750
$str = trim($str);
748751
$str = ucwords($str);

0 commit comments

Comments
 (0)