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/field_funcs1.phpt ('oci_field_*() family: error cases')

Script

1: <?php
2:
3:
require(__DIR__."/connect.inc");
4:
5:
// Initialize
6:
7:
$stmtarray = array(
8:     
"drop table field_funcs1_tab",
9:     
"create table field_funcs1_tab (id number, value number)",
10:     
"insert into field_funcs1_tab (id, value) values (1,1)",
11:     
"insert into field_funcs1_tab (id, value) values (1,1)",
12:     
"insert into field_funcs1_tab (id, value) values (1,1)"
13:
);
14:
15:
oci8_test_sql_execute($c$stmtarray);
16:
17:
// Run Test
18:
19:
if (!($s oci_parse($c"select * from field_funcs1_tab"))) {
20:     die(
"oci_parse(select) failed!\n");
21: }
22:
23: if (!
oci_execute($s)) {
24:     die(
"oci_execute(select) failed!\n");
25: }
26:
27:
$row oci_fetch_array($sOCI_NUM OCI_RETURN_NULLS OCI_RETURN_LOBS);
28:
var_dump($row);
29:
30: echo 
"Test 1\n";
31:
var_dump(oci_field_is_null($s, -1));
32:
var_dump(oci_field_name($s, -1));
33:
var_dump(oci_field_type($s, -1));
34:
var_dump(oci_field_type_raw($s, -1));
35:
var_dump(oci_field_scale($s, -1));
36:
var_dump(oci_field_precision($s, -1));
37:
var_dump(oci_field_size($s, -1));
38:
39: echo 
"Test 2\n";
40:
var_dump(oci_field_is_null($s"none"));
41:
var_dump(oci_field_name($s"none"));
42:
var_dump(oci_field_type($s"none"));
43:
var_dump(oci_field_type_raw($s"none"));
44:
var_dump(oci_field_scale($s"none"));
45:
var_dump(oci_field_precision($s"none"));
46:
var_dump(oci_field_size($s"none"));
47:
48: echo 
"Test 3\n";
49:
var_dump(oci_field_is_null($c, -1));
50:
var_dump(oci_field_name($c, -1));
51:
var_dump(oci_field_type($c, -1));
52:
var_dump(oci_field_type_raw($c, -1));
53:
var_dump(oci_field_scale($c, -1));
54:
var_dump(oci_field_precision($c, -1));
55:
var_dump(oci_field_size($c, -1));
56:
57: echo 
"Test 4\n";
58:
var_dump(oci_field_is_null($s, array()));
59:
var_dump(oci_field_name($s, array()));
60:
var_dump(oci_field_type($s, array()));
61:
var_dump(oci_field_type_raw($s, array()));
62:
var_dump(oci_field_scale($s, array()));
63:
var_dump(oci_field_precision($s, array()));
64:
var_dump(oci_field_size($s, array()));
65:
66:
var_dump(oci_field_size($s));
67:
68:
69:
// Cleanup
70:
71:
$stmtarray = array(
72:     
"drop table field_funcs1_tab"
73:
);
74:
75:
oci8_test_sql_execute($c$stmtarray);
76:
77: echo 
"Done\n";
78:
79:
?>
80:

Expected

array(2) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "1"
}
Test 1

Warning: oci_field_is_null(): Invalid column index "-1" in %s on line %d
bool(false)

Warning: oci_field_name(): Invalid column index "-1" in %s on line %d
bool(false)

Warning: oci_field_type(): Invalid column index "-1" in %s on line %d
bool(false)

Warning: oci_field_type_raw(): Invalid column index "-1" in %s on line %d
bool(false)

Warning: oci_field_scale(): Invalid column index "-1" in %s on line %d
bool(false)

Warning: oci_field_precision(): Invalid column index "-1" in %s on line %d
bool(false)

Warning: oci_field_size(): Invalid column index "-1" in %s on line %d
bool(false)
Test 2

Warning: oci_field_is_null(): Invalid column name "none" in %s on line %d
bool(false)

Warning: oci_field_name(): Invalid column name "none" in %s on line %d
bool(false)

Warning: oci_field_type(): Invalid column name "none" in %s on line %d
bool(false)

Warning: oci_field_type_raw(): Invalid column name "none" in %s on line %d
bool(false)

Warning: oci_field_scale(): Invalid column name "none" in %s on line %d
bool(false)

Warning: oci_field_precision(): Invalid column name "none" in %s on line %d
bool(false)

Warning: oci_field_size(): Invalid column name "none" in %s on line %d
bool(false)
Test 3

Warning: oci_field_is_null(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)

Warning: oci_field_name(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)

Warning: oci_field_type(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)

Warning: oci_field_type_raw(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)

Warning: oci_field_scale(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)

Warning: oci_field_precision(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)

Warning: oci_field_size(): supplied resource is not a valid oci8 statement resource in %s on line %d
bool(false)
Test 4

Warning: oci_field_is_null(): Invalid column index "0" in %s on line %d
bool(false)

Warning: oci_field_name(): Invalid column index "0" in %s on line %d
bool(false)

Warning: oci_field_type(): Invalid column index "0" in %s on line %d
bool(false)

Warning: oci_field_type_raw(): Invalid column index "0" in %s on line %d
bool(false)

Warning: oci_field_scale(): Invalid column index "0" in %s on line %d
bool(false)

Warning: oci_field_precision(): Invalid column index "0" in %s on line %d
bool(false)

Warning: oci_field_size(): Invalid column index "0" in %s on line %d
bool(false)

Warning: oci_field_size() expects exactly 2 parameters, 1 given in %s on line %d
bool(false)
Done

Output

array(2) {
  [0]=>
  string(1) "1"
  [1]=>
  string(1) "1"
}
Test 1

Warning: oci_field_is_null(): Invalid column index "-1" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 31
bool(false)

Warning: oci_field_name(): Invalid column index "-1" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 32
bool(false)

Warning: oci_field_type(): Invalid column index "-1" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 33
bool(false)

Warning: oci_field_type_raw(): Invalid column index "-1" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 34
bool(false)

Warning: oci_field_scale(): Invalid column index "-1" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 35
bool(false)

Warning: oci_field_precision(): Invalid column index "-1" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 36
bool(false)

Warning: oci_field_size(): Invalid column index "-1" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 37
bool(false)
Test 2

Warning: oci_field_is_null(): Invalid column name "none" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 40
bool(false)

Warning: oci_field_name(): Invalid column name "none" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 41
bool(false)

Warning: oci_field_type(): Invalid column name "none" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 42
bool(false)

Warning: oci_field_type_raw(): Invalid column name "none" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 43
bool(false)

Warning: oci_field_scale(): Invalid column name "none" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 44
bool(false)

Warning: oci_field_precision(): Invalid column name "none" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 45
bool(false)

Warning: oci_field_size(): Invalid column name "none" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 46
bool(false)
Test 3

Warning: oci_field_is_null(): supplied resource is not a valid oci8 statement resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 49
bool(false)

Warning: oci_field_name(): supplied resource is not a valid oci8 statement resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 50
bool(false)

Warning: oci_field_type(): supplied resource is not a valid oci8 statement resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 51
bool(false)

Warning: oci_field_type_raw(): supplied resource is not a valid oci8 statement resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 52
bool(false)

Warning: oci_field_scale(): supplied resource is not a valid oci8 statement resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 53
bool(false)

Warning: oci_field_precision(): supplied resource is not a valid oci8 statement resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 54
bool(false)

Warning: oci_field_size(): supplied resource is not a valid oci8 statement resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 55
bool(false)
Test 4

Warning: oci_field_is_null(): Invalid column index "0" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 58
bool(false)

Warning: oci_field_name(): Invalid column index "0" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 59
bool(false)

Warning: oci_field_type(): Invalid column index "0" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 60
bool(false)

Warning: oci_field_type_raw(): Invalid column index "0" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 61
bool(false)

Warning: oci_field_scale(): Invalid column index "0" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 62
bool(false)

Warning: oci_field_precision(): Invalid column index "0" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 63
bool(false)

Warning: oci_field_size(): Invalid column index "0" in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 64
bool(false)

Fatal error: Uncaught ArgumentCountError: oci_field_size() expects exactly 2 parameters, 1 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php:66
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php(66): oci_field_size(Resource id #12)
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 66

Diff

096+ Fatal error: Uncaught ArgumentCountError: oci_field_size() expects exactly 2 parameters, 1 given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php:66
097+ Stack trace:
098+ #0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php(66): oci_field_size(Resource id #12)
096- Warning: oci_field_size() expects exactly 2 parameters, 1 given in %s on line %d
097- bool(false)
098- Done
099+ #1 {main}
100+   thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/field_funcs1.php on line 66

 

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

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