From 1aaa4bc3937187c54039a8459409a2efd9cb3cd7 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Mon, 10 Dec 2012 06:42:45 -0500
Subject: [PATCH] Fix PHP Warning: ldap_parse_virtuallist_control() expects parameter 2 to be resource, null given. This happens on Administrative Limit Exceeded error when using VLV.
---
program/lib/Roundcube/rcube_ldap.php | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/program/lib/Roundcube/rcube_ldap.php b/program/lib/Roundcube/rcube_ldap.php
index c9a14d8..c32cea7 100644
--- a/program/lib/Roundcube/rcube_ldap.php
+++ b/program/lib/Roundcube/rcube_ldap.php
@@ -1455,6 +1455,7 @@
if ($this->vlv_active && function_exists('ldap_parse_virtuallist_control')) {
if (ldap_parse_result($this->conn, $this->ldap_result,
$errcode, $matcheddn, $errmsg, $referrals, $serverctrls)
+ && $serverctrls // can be null e.g. in case of adm. limit error
) {
ldap_parse_virtuallist_control($this->conn, $serverctrls,
$last_offset, $this->vlv_count, $vresult);
--
Gitblit v1.9.1