Skip to content

Commit eb4c231

Browse files
committed
ACP2E-4128: [CLOUD] Getting 404 for JS file on checkout page on first attempt after implementing sri patch
1 parent 347d27b commit eb4c231

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/code/Magento/Csp/Plugin/GenerateAssetIntegrity.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,16 @@ public function __construct(
5959
* Generates integrity for RequireJs config.
6060
*
6161
* @param FileManager $subject
62-
* @param File|false $result
62+
* @param File $result
6363
*
64-
* @return File|false
64+
* @return File
6565
*
6666
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
6767
*/
6868
public function afterCreateRequireJsConfigAsset(
6969
FileManager $subject,
70-
mixed $result
71-
): mixed {
70+
File $result
71+
): File {
7272
if (PHP_SAPI == 'cli') {
7373
if (in_array($result->getContentType(), self::CONTENT_TYPES)) {
7474
$integrity = $this->integrityFactory->create(
@@ -122,8 +122,8 @@ public function afterCreateRequireJsMixinsAsset(
122122
*/
123123
public function afterCreateStaticJsAsset(
124124
FileManager $subject,
125-
$result
126-
): false|File {
125+
mixed $result
126+
): mixed {
127127
if ($result !== false && PHP_SAPI === 'cli') {
128128
$this->generateHash($result);
129129
}

0 commit comments

Comments
 (0)