From e4639be4098cce12b0e2a2a1a2d40596b010fde7 Mon Sep 17 00:00:00 2001 From: Don Richards <2738244+DonRichards@users.noreply.github.com> Date: Thu, 23 Feb 2023 16:23:41 -0500 Subject: [PATCH] Fix phpcs errors --- src/MediaSource/MediaSourceService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MediaSource/MediaSourceService.php b/src/MediaSource/MediaSourceService.php index 4df7f848..fb189794 100644 --- a/src/MediaSource/MediaSourceService.php +++ b/src/MediaSource/MediaSourceService.php @@ -289,11 +289,11 @@ class MediaSourceService { } $directory = $this->fileSystem->dirname($content_location); - + if (!$this->fileSystem->prepareDirectory($directory, FileSystemInterface::CREATE_DIRECTORY | FileSystemInterface::MODIFY_PERMISSIONS)) { $parent_directory = dirname($directory); $error_current_user = shell_exec('whoami'); - $sanitized_current_user = str_replace(array("\n", "\r"), '', $error_current_user); + $sanitized_current_user = str_replace(["\n", "\r"], '', $error_current_user); $error_message = "The destination directory does not exist, could not be created, or is not writable by $sanitized_current_user: $directory"; $this->logger->error($error_message); throw new HttpException(500, "An error occurred while processing your request. Please contact the website administrator.");