Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[DomCrawler] extract(): fix a bug when the attribute list is empty #26433

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2018

Conversation

dunglas
Copy link
Member

@dunglas dunglas commented Mar 6, 2018

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

@stof
Copy link
Member

stof commented Mar 7, 2018

does it even make sense to support an empty list of extracted attributes ?

@dunglas
Copy link
Member Author

dunglas commented Mar 10, 2018

@stof the method should either return an empty array (like in my patch) or throw, but a notice isn't acceptable. Returning an empty array if an empty list of args has been provided looks ok to me, but I can change to an exception, your call.

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Mar 12, 2018
@fabpot
Copy link
Member

fabpot commented Mar 13, 2018

Thank you @dunglas.

@fabpot fabpot merged commit 028c9f2 into symfony:2.7 Mar 13, 2018
fabpot added a commit that referenced this pull request Mar 13, 2018
…is empty (dunglas)

This PR was merged into the 2.7 branch.

Discussion
----------

[DomCrawler] extract(): fix a bug when the attribute list is empty

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | n/a   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

Commits
-------

028c9f2 [DomCrawler] extract(): fix a bug when the attribute list is empty
@dunglas dunglas deleted the dom-crawler-bug-extract branch March 13, 2018 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants