Changing new self to new static, to accommodate subclasses of LdapClient.

This commit is contained in:
Dj Padzensky 2016-03-07 15:05:06 -08:00
parent 65ded5a49e
commit a8abc70bcb
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class Client
*/ */
public static function connect($username = null, $password = null) public static function connect($username = null, $password = null)
{ {
$client = new self; $client = new static;
$client->open($client->getLdapServer()); $client->open($client->getLdapServer());
$username = $username ?: $client->getLdapUsername(); $username = $username ?: $client->getLdapUsername();
$password = $password ?: $client->getLdapPassword(); $password = $password ?: $client->getLdapPassword();