Permalink
Browse files

Fixed one documentationerror and added a check to see if php supports…

… the ldapextension.

git-svn-id: http://svn.php.net/repository/pear/packages/Net_LDAP/branches/NET_LDAP_0_6@162826 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 572b826 commit 0d36f4840c76d2d694c927c89dd026d7079905f4 Tarjei Huse committed Jul 7, 2004
Showing with 5 additions and 2 deletions.
  1. +5 −2 LDAP.php
View
@@ -102,6 +102,9 @@ class Net_LDAP extends PEAR
*/
function Net_LDAP($_config = array())
{
+ if (!function_exists('ldap_connect')){
+ return $this->raiseError("It seems that you do not have the ldap-extension installed. Please install it before using this package.");
+ }
foreach ($_config as $k => $v) {
$this->_config[$k] = $v;
}
@@ -622,15 +625,15 @@ function dnExists($dn)
*
* @param string dn
* @param array Array of Attributes to select
- * @return mixed Net_LDAP_Entry or false
+ * @return object Net_LDAP_Entry or Net_LDAP_Error
*/
function &getEntry($dn, $attr = array(''))
{
$result = $this->search($dn, '(objectClass=*)', array('scope' => 'base', 'attributes' => $attr));
if (Net_LDAP::isError($result)) {
return $result;
}
- $entry = $result->shift_entry();
+ $entry = $result->shiftEntry();
if (false == $entry) {
return $this->raiseError('Could not fetch entry');
}

0 comments on commit 0d36f48

Please sign in to comment.