Skip to content

Commit

Permalink
Merge pull request #536 from ans-group/35692-change-key-case
Browse files Browse the repository at this point in the history
35692 - change key case
  • Loading branch information
d0hn authored Oct 14, 2024
2 parents e0c349b + cf2efdc commit d4aba09
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 d4aba09

Please sign in to comment.