Skip to content

Conversation

ghost
Copy link

@ghost ghost commented May 19, 2014

I was getting an Undefined Variable error each time adLDAP was loaded, appears to be as the $options array is only created in the constructor declaration, and isn't being returned beyond the function scope. Not sure if $options should be declared at the top of the class to keep everything tidy (would appreciate clarification) but PHP seems quite happy to muddle through with &$options as is.

I was getting an Undefined Variable error each time adLDAP was loaded, appears to be as the $options array is only created in the constructor declaration, and isn't being returned beyond the function scope. Not sure if $options should be declared at the top of the class to keep everything tidy (would appreciate clarification) but PHP seems quite happy to muddle through with &$options as is.
@samwilson
Copy link
Contributor

Could you give more information about the error you were getting? Because it doesn't seem like this is the best way to solve it. Why would $options be a reference? It isn't being modified in the constructor. What version of PHP are you using?

$options doesn't need to be a class attribute, I reckon, because it's not used anywhere. Unless you mean as a way to get all the default values? But that can be better done by using get*() methods I think.

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.

1 participant