1--TEST--
2ldap_get_values_len() - Testing ldap_get_values_len() that should fail
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($host, $port, $user, $passwd, $protocol_version);
15insert_dummy_data($link, $base);
16$result = ldap_search($link, "$base", "(objectclass=organization)");
17$entry = ldap_first_entry($link, $result);
18
19var_dump(ldap_get_values_len($link, $entry, "inexistentAttribute"));
20?>
21--CLEAN--
22<?php
23include "connect.inc";
24
25$link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
26remove_dummy_data($link, $base);
27?>
28--EXPECTF--
29Warning: ldap_get_values_len(): Cannot get the value(s) of attribute %s in %s on line %d
30bool(false)
31