Skip to content

Commit 3692415

Browse files
Fix ord()-related PHP 8.5 deprecations
1 parent 67729f8 commit 3692415

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BinaryFileResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function setContentDisposition(string $disposition, string $filename = ''
163163
for ($i = 0, $filenameLength = mb_strlen($filename, $encoding); $i < $filenameLength; ++$i) {
164164
$char = mb_substr($filename, $i, 1, $encoding);
165165

166-
if ('%' === $char || \ord($char) < 32 || \ord($char) > 126) {
166+
if ('%' === $char || \ord($char[0]) < 32 || \ord($char[0]) > 126) {
167167
$filenameFallback .= '_';
168168
} else {
169169
$filenameFallback .= $char;

0 commit comments

Comments
 (0)