Skip to content

Commit 5c92d0c

Browse files
Merge pull request #1 from jbclaudio/patch-1
Return an empty string if there's no string
2 parents 3d26005 + e81afd9 commit 5c92d0c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Smartsupp/ChatGenerator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,10 @@ public function hideWidget()
377377
*/
378378
public function javascriptEscape($str)
379379
{
380+
if (!$str) {
381+
return '';
382+
}
383+
380384
$new_str = '';
381385

382386
for ($i = 0; $i < mb_strlen($str); $i++) {

0 commit comments

Comments
 (0)