diff --git a/htdocs/contact.class.php b/htdocs/contact.class.php
index 06b1b132c37..155816187f7 100644
--- a/htdocs/contact.class.php
+++ b/htdocs/contact.class.php
@@ -94,7 +94,7 @@ class Contact
print $this->db->error() . '
' . $sql;
}
- if (define('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)
+ if (defined('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)
{
$ds = dolibarr_ldap_connect();
@@ -265,7 +265,7 @@ class Contact
print $this->db->error() . '
' . $sql;
}
- if (define('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)
+ if (defined('MAIN_MODULE_LDAP') && MAIN_MODULE_LDAP)
{
$ds = dolibarr_ldap_connect();