Fix for cut “illegal byte sequence” error

This commit is contained in:
2019-06-13 00:01:29 -07:00
parent 7723d5ca74
commit 5ec8080efe

View File

@@ -1100,7 +1100,7 @@ foreach ($files as $splFileInfo) {
unset($fkind); unset($fkind);
if ($type == "file") { if ($type == "file") {
$fkind = trim(shell_exec("file -b -p ".$shellpath." | cut -f1 -d,")); $fkind = trim(shell_exec("export LC_ALL=C; file -b -p ".$shellpath." | cut -f1 -d,"));
$stmt->BindValue(":fkind",@$fkind); $stmt->BindValue(":fkind",@$fkind);
} }
@@ -1188,7 +1188,7 @@ foreach ($files as $splFileInfo) {
$message[] = "ctime"; $message[] = "ctime";
} }
if (count($message)) { echo msg("FILE = ".$filename."; CHANGE = ".implode(", ", $message).""); } if (count($message)) { echo msg(" CHANGE = ".implode(", ", $message).""); }
} }