Skip to content

Commit

Permalink
use empty instead of null check
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg committed Jun 9, 2022
1 parent 8708c34 commit 7d62547
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/FilesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function fileAction(Request $request, string $file): BinaryFileResponse
}

// Do not allow files that are not in the database or don't have a parent
if (null === $filesModel || null === $filesModel->pid) {
if (null === $filesModel || empty($filesModel->pid)) {
throw new PageNotFoundException();
}

Expand Down

0 comments on commit 7d62547

Please sign in to comment.