* @param string $append
*/
protected function safeAppend(string &$str, string $append) {
- // $append must not be empty in this function
if ($str === "") {
$str = $append;
return;
}
+ if ($append === "") {
+ return;
+ }
+
if (!$this->labelCharMap[$append[0]]
|| !$this->labelCharMap[$str[\strlen($str) - 1]]) {
$str .= $append;