Skip to content

Commit

Permalink
Fixed #1761: map explicitly to ints.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Apr 20, 2024
1 parent 20b5a6f commit 7386ebd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Ftp/FtpAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use League\MimeTypeDetection\MimeTypeDetector;
use Throwable;

use function array_map;
use function error_clear_last;
use function error_get_last;
use function ftp_chdir;
Expand Down Expand Up @@ -489,7 +490,9 @@ private function normalizePermissions(string $permissions): int

// convert the groups
$mapper = static function ($part) {
return array_sum(str_split($part));
return array_sum(array_map(static function ($p) {
return (int) $p;
}, str_split($part)));
};

// converts to decimal number
Expand Down

0 comments on commit 7386ebd

Please sign in to comment.