Skip to content

Commit b757da8

Browse files
committed
fix: patch up _method check
1 parent 9234617 commit b757da8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Request.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public static function methodOverride()
7070
return strtoupper($method);
7171
}
7272

73-
if (static::getOriginalMethod() === 'POST') {
74-
return strtoupper(static::get(static::METHOD_OVERRIDE));
73+
if (static::getOriginalMethod() === 'POST' && $method = static::get(static::METHOD_OVERRIDE)) {
74+
return strtoupper($method);
7575
}
7676

7777
return null;
@@ -499,7 +499,7 @@ public static function uploadAs(string $key, string $destination, string $name,
499499
$fileExtension = pathinfo($_FILES[$key]['name'], PATHINFO_EXTENSION);
500500

501501
$config['rename'] = true;
502-
$config['name'] = "$name.$fileExtension";
502+
$config['name'] = $name . '.' . $fileExtension;
503503

504504
return static::upload($key, $destination, $config);
505505
}

0 commit comments

Comments
 (0)