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/lob_021.phpt ('oci_lob_free()/close()')

Script

1: <?php
2:
3:
require __DIR__.'/connect.inc';
4: require 
__DIR__.'/create_table.inc';
5:
6:
$ora_sql "INSERT INTO
7:                        "
.$schema.$table_name." (blob)
8:                       VALUES (empty_blob())
9:                       RETURNING
10:                                blob
11:                       INTO :v_blob "
;
12:
13:
$statement oci_parse($c,$ora_sql);
14:
$blob oci_new_descriptor($c,OCI_D_LOB);
15:
oci_bind_by_name($statement,":v_blob"$blob,-1,OCI_B_BLOB);
16:
oci_execute($statementOCI_DEFAULT);
17:
18:
var_dump($blob->write("test"));
19:
var_dump($blob->close());
20:
var_dump($blob->write("test"));
21:
var_dump(oci_free_descriptor($blob));
22:
var_dump($blob->write("test"));
23:
24:
var_dump(oci_free_descriptor($blob));
25:
var_dump(oci_free_descriptor(new stdclass));
26:
27:
$blob oci_new_descriptor($c,OCI_D_LOB);
28: unset(
$blob->descriptor);
29:
var_dump(oci_free_descriptor($blob));
30:
31:
oci_commit($c);
32:
33:
$select_sql "SELECT blob FROM ".$schema.$table_name."";
34:
$s oci_parse($c$select_sql);
35:
oci_execute($s);
36:
37:
var_dump(oci_fetch_array($sOCI_NUM OCI_RETURN_LOBS));
38:
39: require 
__DIR__.'/drop_table.inc';
40:
41: echo 
"Done\n";
42:
43:
?>
44:

Expected

int(4)
bool(true)
int(4)
bool(true)

Warning: OCI-Lob::write(): %s is not a valid oci8 descriptor resource in %s on line %d
bool(false)

Warning: oci_free_descriptor(): %s is not a valid oci8 descriptor resource in %s on line %d
bool(false)

Warning: oci_free_descriptor() expects parameter 1 to be OCI-Lob, object given in %s on line %d
NULL

Warning: oci_free_descriptor(): Unable to find descriptor property in %s on line %d
bool(false)
array(1) {
  [0]=>
  string(8) "testtest"
}
Done

Output

int(4)
bool(true)
int(4)
bool(true)

Warning: OCI-Lob::write(): supplied resource is not a valid oci8 descriptor resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_021.php on line 22
bool(false)

Warning: oci_free_descriptor(): supplied resource is not a valid oci8 descriptor resource in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_021.php on line 24
bool(false)

Fatal error: Uncaught TypeError: oci_free_descriptor() expects parameter 1 to be OCI-Lob, object given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_021.php:25
Stack trace:
#0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_021.php(25): oci_free_descriptor(Object(stdClass))
#1 {main}
  thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_021.php on line 25

Diff

012+ Fatal error: Uncaught TypeError: oci_free_descriptor() expects parameter 1 to be OCI-Lob, object given in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_021.php:25
013+ Stack trace:
014+ #0 /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_021.php(25): oci_free_descriptor(Object(stdClass))
015+ #1 {main}
016+   thrown in /var/php_gcov/PHP_HEAD/ext/oci8/tests/lob_021.php on line 25
012- Warning: oci_free_descriptor() expects parameter 1 to be OCI-Lob, object given in %s on line %d
013- NULL
014- 
015- Warning: oci_free_descriptor(): Unable to find descriptor property in %s on line %d
016- bool(false)
017- array(1) {
018-   [0]=>
019-   string(8) "testtest"
020- }
021- Done

 

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

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