Skip to content

Commit

Permalink
Merge branch '2' into 3
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Oct 20, 2024
2 parents df82059 + b6b78b3 commit a237a6c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Storage/DBFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use SilverStripe\Control\Director;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Forms\FormField;
use SilverStripe\Dev\Deprecation;
use SilverStripe\ORM\FieldType\DBComposite;
use SilverStripe\Core\Validation\ValidationException;
use SilverStripe\Core\Validation\ValidationResult;
Expand Down Expand Up @@ -460,13 +461,12 @@ protected function assertFilenameValid(string $filename): void
}
}


/**
* Hook to validate this record against a validation result
*
* @param null|string $filename Optional filename to validate. If omitted, the current value is validated.
* @param string $filename Optional filename to validate. If omitted, the current value is validated.
*/
public function validate(ValidationResult $result, ?string $filename = null): bool
public function validateFilename(ValidationResult $result, $filename = null): bool
{
if (empty($filename)) {
$filename = $this->getFilename();
Expand Down

0 comments on commit a237a6c

Please sign in to comment.