1--TEST--
2ldap_error() - Basic ldap_error() operation
3--CREDITS--
4Patrick Allaert <patrickallaert@php.net>
5# Belgian PHP Testfest 2009
6--EXTENSIONS--
7ldap
8--SKIPIF--
9<?php require_once('skipifbindfailure.inc'); ?>
10--FILE--
11<?php
12require "connect.inc";
13
14$link = ldap_connect_and_bind($uri, $user, $passwd, $protocol_version);
15@ldap_add($link, "badDN $base", array(
16    "objectClass"	=> array(
17        "top",
18        "dcObject",
19        "organization"),
20    "dc"			=> "my-domain",
21    "o"				=> "my-domain",
22));
23
24var_dump(
25    ldap_error($link)
26);
27?>
28--EXPECT--
29string(17) "Invalid DN syntax"
30