Commit 8d73a7b7 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Fixes #5433 Trying to save NULL value in LDAP caused problems

Showing with 6 additions and 4 deletions
+6 -4
...@@ -49,12 +49,13 @@ class logging { ...@@ -49,12 +49,13 @@ class logging {
* *
* \param $result A status message, containing errors or success messages * \param $result A status message, containing errors or success messages
*/ */
static function log ($action, $objecttype, $object, $changes_array = array(), $result = '') static function log ($action, $objecttype, $object, array $changes_array = array(), $result = '')
{ {
global $config, $ui; global $config, $ui;
if (!is_array($changes_array)) {
trigger_error('log(string,string,string,array(),bool). Forth parameter must be an array.'); if ($result === NULL) {
$changes_array = array(); trigger_error('"Result" parameter should not be NULL');
$result = '';
} }
/* Create data object */ /* Create data object */
......
...@@ -1385,6 +1385,7 @@ class simplePlugin ...@@ -1385,6 +1385,7 @@ class simplePlugin
*/ */
function handle_pre_events($mode, array $addAttrs = array()) function handle_pre_events($mode, array $addAttrs = array())
{ {
$this->ldap_error = '';
return $this->handle_hooks('PRE', $mode, $addAttrs); return $this->handle_hooks('PRE', $mode, $addAttrs);
} }
......
  • bmortier @bmortier

    mentioned in issue #1739

    By agallavardin on 2017-09-02T15:36:48 (imported from GitLab)

    ·

    mentioned in issue #1739

    By agallavardin on 2017-09-02T15:36:48 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment