Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DependencyInjection] fix DOM element namespace URL access#29992
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 commentedJan 26, 2019
| Q | A |
|---|---|
| Branch? | master |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | |
| License | MIT |
| Doc PR |
| foreach ($alias->childNodesas$child) { | ||
| if (!$childinstanceof \DOMElement&&self::NS !==$child->namespaceURI) { | ||
| if (!$childinstanceof \DOMElement||self::NS !==$child->namespaceURI) { |
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.
Originally there was nocontinue statement (this was introduced in#29968). The condition before read like this:
if ($childinstanceof \DOMElement &&self::NS ===$child->namespaceURI) {thrownewInvalidArgumentException(sprintf('Invalid child element "%s" defined for alias "%s" in "%s".',$child->localName,$alias->getAttribute('id'),$file));}
This change ensures that we do not access a potentially not existing$namespaceURI property when$child is noDOMElement instance.
nicolas-grekas commentedJan 26, 2019
Good catch, thanks@xabbuh. |
… (xabbuh)This PR was merged into the 4.3-dev branch.Discussion----------[DependencyInjection] fix DOM element namespace URL access| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |Commits-------429bddf fix DOM element namespace URL access