Skip to content

Commit

Permalink
Code-style patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikuolan committed Sep 2, 2024
1 parent 165846d commit 8ee62bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
### v3.5.2

[2024.07.02; Maikuolan]: Merged zh and zh-TW L10N, and dropped region designations (e.g., CN, TW) in favour of script designations (e.g., Hans, Hant).

[2024.09.02; Maikuolan]: Code-style patch.
8 changes: 2 additions & 6 deletions src/Web.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* License: GNU/GPLv2
* @see LICENSE.txt
*
* This file: Upload handler (last modified: 2024.03.13).
* This file: Upload handler (last modified: 2024.09.02).
*/

namespace phpMussel\Web;
Expand Down Expand Up @@ -365,18 +365,14 @@ public function scan()
die('[phpMussel] ' . $this->Loader->ClientL10N->getString('denied') . ' ' . $TemplateData['detected']);
}

/** Determine whether to send a 415 UNSUPPORTED MEDIA TYPE status code. */
if (
$this->Loader->Configuration['web']['unsupported_media_type_header'] &&
!empty($this->Loader->InstanceCache['blacklist_triggered'])
) {
header('HTTP/1.0 415 Unsupported Media Type');
header('HTTP/1.1 415 Unsupported Media Type');
header('Status: 415 Unsupported Media Type');
}

/** Determine whether to send a 403 FORBIDDEN status code. */
elseif ($this->Loader->Configuration['web']['forbid_on_block']) {
} elseif ($this->Loader->Configuration['web']['forbid_on_block']) {
header('HTTP/1.0 403 Forbidden');
header('HTTP/1.1 403 Forbidden');
header('Status: 403 Forbidden');
Expand Down

0 comments on commit 8ee62bd

Please sign in to comment.