From 36e83fed7cf25ed8ac5a0b9d657d625fa5555fd0 Mon Sep 17 00:00:00 2001 From: neopheus Date: Thu, 3 Dec 2020 21:28:14 +0100 Subject: [PATCH] Fix Error - Windows - mb_detect_encoding - #739 --- src/Lfm.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Lfm.php b/src/Lfm.php index d574aab6..871fa29e 100644 --- a/src/Lfm.php +++ b/src/Lfm.php @@ -191,8 +191,18 @@ public function allowShareFolder() */ public function translateFromUtf8($input) { + $rInput = []; + if ($this->isRunningOnWindows()) { - $input = iconv('UTF-8', mb_detect_encoding($input), $input); + if (is_array($input)) { + foreach ($input as $k => $i) { + $rInput[] = iconv('UTF-8', mb_detect_encoding($i), $i); + } + } else { + $rInput = $input; + } + } else { + $rInput = $input; } return $input;