Skip to content

Commit

Permalink
Fix coding style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Schneider committed Jan 12, 2022
1 parent 9a5af53 commit 8204cfd
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions lib/Horde/String.php
Expand Up @@ -157,16 +157,14 @@ protected static function _convertCharset($input, $from, $to)

/* Try mbstring. */
if (Horde_Util::extensionExists('mbstring')) {
try {
$out = @mb_convert_encoding($input, $to, self::_mbstringCharset($from));
if (!empty($out))
{
return $out;
}
}
catch (ValueError $e) {
// catch error thrown under PHP 8.0, if mbstring does not support the encoding
}
try {
$out = @mb_convert_encoding($input, $to, self::_mbstringCharset($from));
if (!empty($out)) {
return $out;
}
} catch (ValueError $e) {
// catch error thrown under PHP 8.0, if mbstring does not support the encoding
}
}

return $input;
Expand Down

0 comments on commit 8204cfd

Please sign in to comment.