Skip to content

Commit

Permalink
Merge pull request #27 from mspgmbh/feature/uploadfoldercheck
Browse files Browse the repository at this point in the history
[TASK] Add upload folder check
  • Loading branch information
joey-bolts authored Sep 13, 2021
2 parents 51bd208 + d4c5e9a commit 9eb74c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Classes/Hooks/DefaultUploadFolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,13 @@ class DefaultUploadFolder
*
* @param array $params
* @param BackendUserAuthentication $backendUserAuthentication
* @return Folder
* @return Folder|null
*/
public function getDefaultUploadFolder($params, BackendUserAuthentication $backendUserAuthentication):Folder
public function getDefaultUploadFolder($params, BackendUserAuthentication $backendUserAuthentication):?Folder
{
if (!($params['uploadFolder'] instanceof Folder)) {
return null;
}
$rteParameters = $_GET['P'] ?? [];
/** @var Folder $uploadFolder */
$uploadFolder = $params['uploadFolder'];
Expand Down

0 comments on commit 9eb74c0

Please sign in to comment.