Skip to content

Commit

Permalink
35692 - change key case
Browse files Browse the repository at this point in the history
  • Loading branch information
Mac Koniarek committed Oct 14, 2024
1 parent 4eae99f commit 8198b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DDoSX/Entities/VerificationFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getStream()
*/
public function getName()
{
$contentDisposition = $this->response->getHeaders()['Content-Disposition'][0];
$contentDisposition = array_change_key_case($this->response->getHeaders())['content-disposition'][0];
$filenameMatch = preg_match('/filename="([[:alnum:]]+\.[[:alnum:]]+)"/', $contentDisposition, $filename);

if ($filenameMatch === false || empty($filename[1])) {
Expand All @@ -42,7 +42,7 @@ public function getName()
*/
public function getContentType()
{
$contentType = $this->response->getHeaders()['Content-Type'][0];
$contentType = array_change_key_case($this->response->getHeaders())['content-type'][0];
if (empty($contentType) === false) {
return $contentType;
}
Expand Down

0 comments on commit 8198b37

Please sign in to comment.