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

[Ldap] Fixed CS and hardened some code #17833

Merged
merged 1 commit into from Feb 18, 2016
Merged

[Ldap] Fixed CS and hardened some code #17833

merged 1 commit into from Feb 18, 2016

Conversation

csarrazi
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #16665
License MIT
Doc PR no

This PR takes into account remaining comments from #16665

@csarrazi csarrazi changed the title Fixed CS and hardened some code [Ldap] Fixed CS and hardened some code Feb 17, 2016
@fabpot
Copy link
Member

fabpot commented Feb 17, 2016

👍

@fabpot
Copy link
Member

fabpot commented Feb 18, 2016

Thank you @csarrazi.

@fabpot fabpot merged commit eefa70d into symfony:master Feb 18, 2016
fabpot added a commit that referenced this pull request Feb 18, 2016
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Ldap] Fixed CS and hardened some code

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16665
| License       | MIT
| Doc PR        | no

This PR takes into account remaining comments from #16665

Commits
-------

eefa70d Fixed CS and hardened some code
@@ -84,7 +85,13 @@ private function initialize()
return;
}

$entries = ldap_get_entries($this->connection->getResource(), $this->search->getResource());
$con = $this->connection->getResource();
Copy link
Member

Choose a reason for hiding this comment

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

What if getResource() returns null (maybe I simply miss the point where we ensure that the connection is always established before this code is executed)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The connection is always established before this code is executed.

Either the Query class creates the connection if non-existent (with default values), or it uses the existing connection.

@csarrazi csarrazi deleted the feature/cleanup-ldap branch February 18, 2016 12:54
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.

None yet

4 participants