1
0
mirror of https://github.com/splitbrain/php-archive.git synced 2025-01-17 13:38:26 +01:00

fixed that iconv workaround

had a little logic error there - need to preserve the original string to
retry the encoding a second time
This commit is contained in:
Andreas Gohr 2017-03-03 15:44:46 +01:00
parent aa9ae83c80
commit 735029407f

View File

@ -655,9 +655,9 @@ class Zip extends Archive
{
// try iconv first
if (function_exists('iconv')) {
$string = @iconv('UTF-8', 'CP437//IGNORE', $string);
$conv = @iconv('UTF-8', 'CP437//IGNORE', $string);
if($conv) return $conv; // it worked
}
if($string) return $string; // it worked
// still here? iconv failed to convert the string. Try another method
// see http://php.net/manual/en/function.iconv.php#108643