From 71047326faf2feaac3f4017e71dad8d2fa5b2e42 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Thu, 10 Sep 2009 13:16:26 -0400
Subject: [PATCH] - Fix LDAP partial result warning (#1485536)
---
CHANGELOG | 1 +
program/include/rcube_ldap.php | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index a61ebe7..e2fcf8e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
+- Fix LDAP partial result warning (#1485536)
- Fix delete in message view deletes permanently with flag_for_deletion=true (#1486101)
- Use faster/secure mt_rand() (#1486094)
- Fix roundcube hangs on empty inbox with bincimapd (#1486093)
diff --git a/program/include/rcube_ldap.php b/program/include/rcube_ldap.php
index 9854ac0..82e1df2 100644
--- a/program/include/rcube_ldap.php
+++ b/program/include/rcube_ldap.php
@@ -388,7 +388,7 @@
$res = null;
if ($this->conn && $dn)
{
- $this->ldap_result = ldap_read($this->conn, base64_decode($dn), '(objectclass=*)', array_values($this->fieldmap));
+ $this->ldap_result = @ldap_read($this->conn, base64_decode($dn), '(objectclass=*)', array_values($this->fieldmap));
$entry = @ldap_first_entry($this->conn, $this->ldap_result);
if ($entry && ($rec = ldap_get_attributes($this->conn, $entry)))
@@ -565,7 +565,7 @@
{
$filter = $this->filter ? $this->filter : '(objectclass=*)';
$function = $this->prop['scope'] == 'sub' ? 'ldap_search' : ($this->prop['scope'] == 'base' ? 'ldap_read' : 'ldap_list');
- $this->ldap_result = $function($this->conn, $this->prop['base_dn'], $filter, array_values($this->fieldmap), 0, 0);
+ $this->ldap_result = @$function($this->conn, $this->prop['base_dn'], $filter, array_values($this->fieldmap), 0, 0);
return true;
}
else
--
Gitblit v1.9.1