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

Use strict comparisons when matching scrub keys #65

Merged
merged 2 commits into from Jul 28, 2015

Conversation

ghostal
Copy link
Contributor

@ghostal ghostal commented Jul 25, 2015

Better solution for bug highlighted in PR #64.

Because of the loose comparison used by default by in_array(), the code below causes the output that follows:

$fruits = ['apple', 'banana', 'cherry'];
var_dump(in_array(0, $fruits));
var_dump(in_array(0, $fruits, true));
bool(true)
bool(false)

In the rollbar library, this means that any zero indexed array always has its first element scrubbed.

brianr added a commit that referenced this pull request Jul 28, 2015
Use strict comparisons when matching scrub keys
@brianr brianr merged commit e7aef6f into rollbar:master Jul 28, 2015
@brianr
Copy link
Member

brianr commented Jul 28, 2015

This is great, thanks @ghostal!

I've verified that the new test fails on the old code, and passes after the fix.

Will get a new release out shortly.

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