Skip to content
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

[2.1] Prevent infinite loop on empty xml elements #161

Merged
merged 2 commits into from Jan 9, 2019

Conversation

DeepDiver1975
Copy link
Member

port of #158 to 2.1

@DeepDiver1975 DeepDiver1975 self-assigned this Jan 9, 2019
@codecov
Copy link

codecov bot commented Jan 9, 2019

Codecov Report

Merging #161 into 2.1 will decrease coverage by 1.33%.
The diff coverage is 62.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.1     #161      +/-   ##
============================================
- Coverage     98.82%   97.48%   -1.34%     
  Complexity      112      112              
============================================
  Files            13       13              
  Lines           426      438      +12     
============================================
+ Hits            421      427       +6     
- Misses            5       11       +6
Impacted Files Coverage Δ Complexity Δ
lib/Deserializer/functions.php 87.5% <62.5%> (-6.62%) 0 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c5f510f...e15454e. Read the comment docs.

@DeepDiver1975 DeepDiver1975 changed the title [2.0] Prevent infinite loop on empty xml elements [2.1] Prevent infinite loop on empty xml elements Jan 9, 2019
@DeepDiver1975
Copy link
Member Author

$reader->next();

return [];
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels a bit hacky. Makes me wonder if this is there is a cleaner way to do this. Would for instance just a single $reader->next() do the job (removing $reader->read()?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THX for your feedback @evert

I can have a look at this ....
Since I already tagged the versions are you okay in accepting this implementation as is?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea np. If it works it works. It was a mild concern. The tests pass which is the most important =)

@DeepDiver1975 DeepDiver1975 merged commit 9d1907d into 2.1 Jan 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the bugfix/infinite-loop-2.1 branch January 9, 2019 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants