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

Remove unneeded code #108

Merged
merged 1 commit into from
Apr 10, 2020
Merged

Remove unneeded code #108

merged 1 commit into from
Apr 10, 2020

Conversation

GrahamCampbell
Copy link
Contributor

As pointed out by @arjendekorte, #106 should never have been merged, since #102 already provided a better fix.

@GrahamCampbell
Copy link
Contributor Author

GrahamCampbell commented Feb 29, 2020

The reason the 2nd PR was created is because no release containing the original fix was ever tagger, and the 2nd PR author didn't look to see if there was an unreleased fix already in the code.

Copy link
Member

@ashnazg ashnazg left a comment

Choose a reason for hiding this comment

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

Does it hurt anything by keeping this as a last ditch safety check that $cacheid is indeed an array after the getCacheId() call?

@arjendekorte
Copy link
Contributor

Probably not, but it does change the program flow: it returns earlier to the caller with false, skipping a couple of lines that were executed before these patches became necessary. This may sound a bit academic, but regression testing is a lot easier if you don't have to consider this. A patch should not change the program flow if not absolutely necessary.

@ashnazg ashnazg merged commit bf6fec5 into pear:master Apr 10, 2020
@GrahamCampbell GrahamCampbell deleted the patch-1 branch April 10, 2020 18:39
@ashnazg
Copy link
Member

ashnazg commented Apr 10, 2020

Included in v1.10.11 release.

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

5 participants