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/oci8/tests/define1.phpt ('oci_define_by_name()')

Script

1: <?php
2:
3:
require(__DIR__."/connect.inc");
4:
5:
// Initialize
6:
7:
$stmtarray = array(
8:     
"drop table define1_tab",
9:     
"create table define1_tab (string varchar(10))",
10:     
"insert into define1_tab (string) values ('some')",
11: );
12:
13:
oci8_test_sql_execute($c$stmtarray);
14:
15:
// Run test
16:
17:
$stmt oci_parse($c"select string from define1_tab");
18:
19:
/* the define MUST be done BEFORE ociexecute! */
20:
21:
$string '';
22:
var_dump(oci_define_by_name($stmt"STRING"$string20));
23:
var_dump(oci_define_by_name($stmt"STRING"$string20));
24:
var_dump(oci_define_by_name($stmt""$string20));
25:
var_dump(oci_define_by_name($stmt""));
26:
27:
oci_execute($stmt);
28:
29: while (
oci_fetch($stmt)) {
30:     
var_dump($string);
31: }
32:
33:
// Cleanup
34:
35:
$stmtarray = array(
36:     
"drop table define1_tab"
37:
);
38:
39:
oci8_test_sql_execute($c$stmtarray);
40:
41: echo 
"Done\n";
42:
43:
?>
44:

Expected

bool(true)
bool(false)

Warning: oci_define_by_name(): Column name cannot be empty in %s on line %d
bool(false)

Warning: oci_define_by_name() expects at least 3 parameters, 2 given in %s on line %d
NULL
string(4) "some"
Done

Output

bool(true)
bool(false)

Warning: oci_define_by_name(): Column name cannot be empty in /var/php_gcov/PHP_HEAD/ext/oci8/tests/define1.php on line 24
bool(false)

Fatal error: Uncaught ArgumentCountError: oci_define_by_name() expects at least 3 parameters, 2 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/define1.php:25
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/define1.php(25): oci_define_by_name(Resource id #10, '')
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/define1.php on line 25

Diff

007+ Fatal error: Uncaught ArgumentCountError: oci_define_by_name() expects at least 3 parameters, 2 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/define1.php:25
008+ Stack trace:
009+ #0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/define1.php(25): oci_define_by_name(Resource id #10, '')
010+ #1 {main}
007- Warning: oci_define_by_name() expects at least 3 parameters, 2 given in %s on line %d
008- NULL
009- string(4) "some"
010- Done
011+   thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/define1.php on line 25

 

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

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