From 15f80fd88704fb52abb820e2651c2eeaf1805df9 Mon Sep 17 00:00:00 2001 From: iarenaza Date: Sat, 31 May 2008 15:00:42 +0000 Subject: [PATCH] MDL-4248 Fix error when updating user profiles and any of these fields is empty According to http://es2.php.net/manual/en/function.ldap-modify.php#43216 we need to specify an array() value to delete an attribute's value, instead of an empty string. Merged from MOODLE_18_STABLE --- auth/ldap/auth.php | 1 + 1 file changed, 1 insertion(+) diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 73c38a8954..a47b716262 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -1099,6 +1099,7 @@ error('fix temporary table code in CAS'); } $nuvalue = $textlib->convert($newuser->$key, 'utf-8', $this->config->ldapencoding); + empty($nuvalue) ? $nuvalue = array() : $nuvalue; $ouvalue = $textlib->convert($olduser->$key, 'utf-8', $this->config->ldapencoding); foreach ($ldapkeys as $ldapkey) { -- 2.39.5