2 commits - lib/ext lib/kolab_client_task.php
Aleksander Machniak
machniak at kolabsys.com
Wed Apr 10 21:22:35 CEST 2013
lib/ext/Net/LDAP3.php | 7 ++++++-
lib/kolab_client_task.php | 4 ++--
2 files changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 733fb02dea977f9ab19e694ee15ea9b6864821ce
Author: Aleksander Machniak <alec at alec.pl>
Date: Wed Apr 10 21:21:52 2013 +0200
Prevent some PHP warnings when a var is not an array
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 8583e01..893f35e 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -1020,8 +1020,8 @@ class kolab_client_task
// Get the rights on the entry and attribute level
$data['effective_rights'] = $this->effective_rights($name, $data['id']);
- $attribute_rights = $data['effective_rights']['attribute'];
- $entry_rights = $data['effective_rights']['entry'];
+ $attribute_rights = (array) $data['effective_rights']['attribute'];
+ $entry_rights = (array) $data['effective_rights']['entry'];
// See if "administrators" (those who can delete and add back on the entry
// level) may override the automatically generated contents of auto_form_fields.
commit 59c70ba49c4c4526d54c5d55892285075577bc77
Author: Aleksander Machniak <alec at alec.pl>
Date: Wed Apr 10 21:20:00 2013 +0200
Better error handling on ldapsearch usage (Bug #1733)
diff --git a/lib/ext/Net/LDAP3.php b/lib/ext/Net/LDAP3.php
index 6e9ca50..5967fa3 100644
--- a/lib/ext/Net/LDAP3.php
+++ b/lib/ext/Net/LDAP3.php
@@ -583,7 +583,7 @@ class Net_LDAP3
}
if (empty($moz_ldapsearch)) {
- $this->_debug("Mozilla LDAP C SDK binary ldapsearch not found, cannot get effective rights on subject $subject");
+ $this->_error("Mozilla LDAP C SDK binary ldapsearch not found, cannot get effective rights on subject $subject");
return null;
}
@@ -621,6 +621,11 @@ class Net_LDAP3
$this->_debug("LDAP: Command output:" . var_export($output, true));
$this->_debug("Return code: " . $return_code);
+ if ($return_code) {
+ $this->_error("Command $moz_ldapsearch returned error code: $return_code");
+ return null;
+ }
+
$lines = array();
foreach ($output as $line_num => $line) {
if (substr($line, 0, 1) == " ") {
More information about the commits
mailing list