Only attempt to show initials if not empty

This commit is contained in:
Marcus Hill 2022-12-11 01:32:14 +00:00
parent 69dbb51e93
commit a0233c77ec
2 changed files with 7 additions and 4 deletions

1
email_parser_cron.php Normal file
View File

@ -0,0 +1 @@
<?php

View File

@ -35,10 +35,12 @@ function key32gen()
}
function initials($str) {
$ret = '';
foreach (explode(' ', $str) as $word)
$ret .= strtoupper($word[0]);
return $ret;
if(!empty($str)){
$ret = '';
foreach (explode(' ', $str) as $word)
$ret .= strtoupper($word[0]);
return $ret;
}
}
function removeDirectory($path) {