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

Check phpinfo() is available before using #1256

Merged
merged 1 commit into from Mar 27, 2018

Conversation

Projects
None yet
2 participants
@weshooper
Copy link
Contributor

weshooper commented Mar 24, 2018

Fixes an issue I raised at #1255

Proof of logic at https://3v4l.org/RqrHt

I ended up moving more code than discussed in the issue - initially to avoid $content being undefined when it came to preg_match_all(), but also as it made sense grouping the code that way. Also, initialising $versions outside the check, right at the start ensures it's always defined for the switch code further down.

Check phpinfo() is available before using
Fixes an issue I raised at #1255

Proof of logic at https://3v4l.org/RqrHt

I ended up moving more code than discussed in the issue - initially to avoid `$content` being undefined when it came to `preg_match_all()`, but also as it made sense grouping the code that way. Also, initialising `$versions` outside the check, right at the start ensures it's always defined for the `switch` code further down.

@terrafrost terrafrost merged commit d4a9845 into phpseclib:2.0 Mar 27, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment