PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/ldap/tests/ldap_free_result_error.phpt ('ldap_free_result() - Testing ldap_free_result() that should fail')

Script

1: <?php
2:
require "connect.inc";
3:
4:
$link ldap_connect($host$port);
5:
var_dump(ldap_free_result($link));
6:
var_dump(ldap_free_result($link"Additional data"));
7:
?>
8:
===DONE===
9:

Expected

Warning: ldap_free_result(): supplied resource is not a valid ldap result resource in %s on line %d
bool(false)

Warning: ldap_free_result() expects exactly 1 parameter, 2 given in %s on line %d
NULL
===DONE===

Output

Warning: ldap_free_result(): supplied resource is not a valid ldap result resource in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_free_result_error.php on line 5
bool(false)

Fatal error: Uncaught ArgumentCountError: ldap_free_result() expects exactly 1 parameter, 2 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_free_result_error.php:6
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_free_result_error.php(6): ldap_free_result(Resource id #5, 'Additional data')
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_free_result_error.php on line 6

Diff

004+ Fatal error: Uncaught ArgumentCountError: ldap_free_result() expects exactly 1 parameter, 2 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_free_result_error.php:6
005+ Stack trace:
006+ #0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_free_result_error.php(6): ldap_free_result(Resource id #5, 'Additional data')
004- Warning: ldap_free_result() expects exactly 1 parameter, 2 given in %s on line %d
005- NULL
006- ===DONE===
007+ #1 {main}
008+   thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_free_result_error.php on line 6

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (942 days ago)

Copyright © 2005-2021 The PHP Group
All rights reserved.