Skip to content

Commit

Permalink
[TASK] Ignore Extension Scanner false positives
Browse files Browse the repository at this point in the history
  • Loading branch information
astehlik committed Jun 9, 2024
1 parent fe7486f commit 64f1117
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Classes/Controller/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public function renderMediaAction(): ResponseInterface
$contentObject = $this->getCurrentContentObject();

try {
/** @extensionScannerIgnoreLine */
$uid = $contentObject->data['_LOCALIZED_UID'] ?? $contentObject->data['uid'];
$media = $this->mediaRepository->findOneByContentElementUid($uid);
} catch (MediaException $mediaException) {
Expand All @@ -67,6 +68,7 @@ public function renderMediaForRelatedTableAction(): ResponseInterface
$contentObject = $this->getCurrentContentObject();

try {
/** @extensionScannerIgnoreLine */
$media = $this->mediaRepository->findOneByParentRecord($contentObject->data);
} catch (MediaException $mediaException) {
return $this->htmlResponse($this->translate('exception.' . $mediaException->getCode()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function testMediaControllerShowsVideo(): void
$container = $this->getContainer();

$contentObject = new ContentObjectRenderer();
// @extensionScannerIgnoreLine
$contentObject->data = [
'parent_table' => 'a_dummy_table',
'parent_record' => 23,
Expand Down

0 comments on commit 64f1117

Please sign in to comment.