Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[Validator] add missing$extensions
and$extensionsMessage
to theImage
constraint#60478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
xabbuh commentedMay 19, 2025
Q | A |
---|---|
Branch? | 6.4 |
Bug fix? | yes |
New feature? | no |
Deprecations? | no |
Issues | Fix1613e55#commitcomment-137679894 |
License | MIT |
$extensions
and$extensionsMessage
to the Image constraint$extensions
and$extensionsMessage
to theImage
constraint@@ -192,6 +196,10 @@ public function __construct( | |||
$this->allowPortraitMessage =$allowPortraitMessage ??$this->allowPortraitMessage; | |||
$this->corruptedMessage =$corruptedMessage ??$this->corruptedMessage; | |||
if (null ===$this->mimeTypes && [] ===$this->extensions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
doesn't the second check change the behavior? extensions is null by default, so we won't set mimeTypes to its default anymore, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The property is initialised with an empty array in the parent class which then also has this line in its constructor (which is called before the code here is run):
$this->extensions =$extensions ??$this->extensions;
Thank you@xabbuh. |
4832299
intosymfony:6.4Uh oh!
There was an error while loading.Please reload this page.