Skip to content

Commit

Permalink
Merge pull request silverstripe#651 from creative-commoners/pulls/3/f…
Browse files Browse the repository at this point in the history
…ix-mergeup

FIX Use renamed validate method
  • Loading branch information
GuySartorelli authored Oct 21, 2024
2 parents a237a6c + 7973a2d commit 591160c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ public function getAbsoluteSize()
public function validate()
{
$result = ValidationResult::create();
$this->File->validate($result, $this->Name);
$this->File->validateFilename($result, $this->Name);
$this->extend('updateValidate', $result);
return $result;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Storage/DBFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ protected function isValidFilename(string $filename): bool
protected function assertFilenameValid(string $filename): void
{
$result = new ValidationResult();
$this->validate($result, $filename);
$this->validateFilename($result, $filename);
if (!$result->isValid()) {
throw new ValidationException($result);
}
Expand Down

0 comments on commit 591160c

Please sign in to comment.