diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index 34f8d78cd597e0efc7017a10246ca4db405eac82..9a43ced0a4b3e2b75d7c26c037c3089ab07a772c 100644
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
@@ -1150,7 +1150,7 @@ class LDAP
           if (preg_match('/^</', $value)) {
             throw new Exception(sprintf(_('Error line %s, references to an external file are not supported'), $lineNumber));
           }
-          if (empty($value)) {
+          if ($value === '') {
             throw new Exception(sprintf(_('Error line %s, attribute "%s" has no value'), $lineNumber, $key));
           }
           if ($key == 'dn') {