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_err2str_error.phpt ('ldap_err2str() - Incorrect usage of number to string conversion')

Script

1: <?php
2:
// Too few args
3:
var_dump(ldap_err2str());
4:
5:
// Too many args
6:
var_dump(ldap_err2str(1"Additional data"));
7:
8:
var_dump(ldap_err2str("weird"));
9:
?>
10:
===DONE===
11:

Expected

Warning: ldap_err2str() expects exactly 1 parameter, 0 given in %s on line %d
NULL

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

Warning: ldap_err2str() expects parameter 1 to be int, string given in %s on line %d
NULL
===DONE===

Output

Fatal error: Uncaught ArgumentCountError: ldap_err2str() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_err2str_error.php:3
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_err2str_error.php(3): ldap_err2str()
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_err2str_error.php on line 3

Diff

001+ Fatal error: Uncaught ArgumentCountError: ldap_err2str() expects exactly 1 parameter, 0 given in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_err2str_error.php:3
002+ Stack trace:
003+ #0 /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_err2str_error.php(3): ldap_err2str()
004+ #1 {main}
005+   thrown in /var/php_gcov/PHP_HEAD/ext/ldap/tests/ldap_err2str_error.php on line 3
001- Warning: ldap_err2str() expects exactly 1 parameter, 0 given in %s on line %d
002- NULL
003- 
004- Warning: ldap_err2str() expects exactly 1 parameter, 2 given in %s on line %d
005- NULL
006- 
007- Warning: ldap_err2str() expects parameter 1 to be int, string given in %s on line %d
008- NULL
009- ===DONE===

 

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

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