diff --git a/lam/templates/domain.php b/lam/templates/domain.php
index c9bd630d..4db48729 100644
--- a/lam/templates/domain.php
+++ b/lam/templates/domain.php
@@ -275,10 +275,10 @@ elseif ($_POST['sub_save']) {
if ($_POST['dom_nextUserRID']) $attr['sambaNextUserRid'] = $_POST['dom_nextUserRID'];
$attr['sambaAlgorithmicRidBase'] = $_POST['dom_RIDbase'];
// write to LDAP
- if (ldap_add($_SESSION['ldap']->server(), $DN, $attr)) {
+ if (@ldap_add($_SESSION['ldap']->server(), $DN, $attr)) {
StatusMessage("INFO", "Domain has been created.", $DN);
}
- else StatusMessage("ERROR", "", "Failed to add domain!");
+ else StatusMessage("ERROR", "", "Failed to add domain!" . "\n
" . ldap_error($_SESSION['ldap']->server()));
}
echo "
\n"; echo "\n";